Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
7f1b8f3c
Commit
7f1b8f3c
authored
22 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Several critical bug fixes in _slurm_send_timeout and _slurm_recv_timeout
parent
fe419112
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/slurm_protocol_socket_implementation.c
+11
-10
11 additions, 10 deletions
src/common/slurm_protocol_socket_implementation.c
with
11 additions
and
10 deletions
src/common/slurm_protocol_socket_implementation.c
+
11
−
10
View file @
7f1b8f3c
...
@@ -301,7 +301,7 @@ int _slurm_send_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
...
@@ -301,7 +301,7 @@ int _slurm_send_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
{
{
_slurm_FD_SET
(
open_fd
,
&
set
)
;
_slurm_FD_SET
(
open_fd
,
&
set
)
;
rc
=
_slurm_select
(
open_fd
+
1
,
NULL
,
&
set
,
NULL
,
timeout
)
;
rc
=
_slurm_select
(
open_fd
+
1
,
NULL
,
&
set
,
NULL
,
timeout
)
;
if
(
rc
==
SLURM_PROTOCOL_ERROR
||
rc
<
0
)
if
(
(
rc
==
SLURM_PROTOCOL_ERROR
)
||
(
rc
<
0
)
)
{
{
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
{
{
...
@@ -344,14 +344,14 @@ int _slurm_send_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
...
@@ -344,14 +344,14 @@ int _slurm_send_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
}
}
}
}
return
bytes_sent
;
if
(
fd_flags
!=
SLURM_PROTOCOL_ERROR
)
if
(
flags
!=
SLURM_PROTOCOL_ERROR
)
{
{
_slurm_fcntl
(
open_fd
,
F_SETFL
,
fd_flags
)
;
_slurm_fcntl
(
open_fd
,
F_SETFL
,
fd_flags
)
;
}
}
return
bytes_sent
;
_slurm_send_timeout_exit_error:
_slurm_send_timeout_exit_error:
if
(
flags
!=
SLURM_PROTOCOL_ERROR
)
if
(
fd_
flags
!=
SLURM_PROTOCOL_ERROR
)
{
{
_slurm_fcntl
(
open_fd
,
F_SETFL
,
fd_flags
)
;
_slurm_fcntl
(
open_fd
,
F_SETFL
,
fd_flags
)
;
}
}
...
@@ -374,7 +374,7 @@ int _slurm_recv_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
...
@@ -374,7 +374,7 @@ int _slurm_recv_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
{
{
_slurm_FD_SET
(
open_fd
,
&
set
)
;
_slurm_FD_SET
(
open_fd
,
&
set
)
;
rc
=
_slurm_select
(
open_fd
+
1
,
&
set
,
NULL
,
NULL
,
timeout
)
;
rc
=
_slurm_select
(
open_fd
+
1
,
&
set
,
NULL
,
NULL
,
timeout
)
;
if
(
rc
==
SLURM_PROTOCOL_ERROR
||
rc
<
0
)
if
(
(
rc
==
SLURM_PROTOCOL_ERROR
)
||
(
rc
<
0
)
)
{
{
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
{
{
...
@@ -393,8 +393,8 @@ int _slurm_recv_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
...
@@ -393,8 +393,8 @@ int _slurm_recv_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
}
}
else
else
{
{
rc
=
_slurm_recv
(
open_fd
,
buffer
+
bytes_recv
,
size
,
flags
)
;
rc
=
_slurm_recv
(
open_fd
,
&
buffer
[
bytes_recv
]
,
(
size
-
bytes_recv
)
,
flags
)
;
if
(
rc
==
SLURM_PROTOCOL_ERROR
||
rc
<
0
)
if
(
(
rc
==
SLURM_PROTOCOL_ERROR
)
||
(
rc
<
0
)
)
{
{
if
(
errno
==
EINTR
)
if
(
errno
==
EINTR
)
...
@@ -414,15 +414,16 @@ int _slurm_recv_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
...
@@ -414,15 +414,16 @@ int _slurm_recv_timeout ( slurm_fd open_fd, char *buffer , size_t size , uint32_
else
else
{
{
bytes_recv
+=
rc
;
bytes_recv
+=
rc
;
break
;
}
}
}
}
}
}
return
bytes_recv
;
if
(
fd_flags
!=
SLURM_PROTOCOL_ERROR
)
if
(
fd_flags
!=
SLURM_PROTOCOL_ERROR
)
{
{
_slurm_fcntl
(
open_fd
,
F_SETFL
,
fd_flags
)
;
_slurm_fcntl
(
open_fd
,
F_SETFL
,
fd_flags
)
;
}
}
return
bytes_recv
;
_slurm_recv_timeout_exit_error:
_slurm_recv_timeout_exit_error:
if
(
fd_flags
!=
SLURM_PROTOCOL_ERROR
)
if
(
fd_flags
!=
SLURM_PROTOCOL_ERROR
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment