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
d30d7f54
Commit
d30d7f54
authored
22 years ago
by
tewk
Browse files
Options
Downloads
Patches
Plain Diff
Fixed deadlock on forked_io threads
parent
16495601
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/slurmd/forked_io.c
+21
-5
21 additions, 5 deletions
src/slurmd/forked_io.c
with
21 additions
and
5 deletions
src/slurmd/forked_io.c
+
21
−
5
View file @
d30d7f54
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
int
forward_io
(
task_start_t
*
task_start
)
int
forward_io
(
task_start_t
*
task_start
)
{
{
pid_t
cpid
;
pid_t
cpid
;
int
*
pipes
=
task_start
->
pipes
;
#define FORK_ERROR -1
#define FORK_ERROR -1
...
@@ -53,6 +54,11 @@ int forward_io ( task_start_t * task_start )
...
@@ -53,6 +54,11 @@ int forward_io ( task_start_t * task_start )
goto
return_label
;
goto
return_label
;
break
;
break
;
case
0
:
/*CHILD*/
case
0
:
/*CHILD*/
close
(
pipes
[
CHILD_IN_RD_PIPE
]
);
close
(
pipes
[
CHILD_OUT_RD_PIPE
]
);
close
(
pipes
[
CHILD_OUT_WR_PIPE
]
);
close
(
pipes
[
CHILD_ERR_RD_PIPE
]
);
close
(
pipes
[
CHILD_ERR_WR_PIPE
]
);
stdin_io_pipe_thread
(
task_start
)
;
stdin_io_pipe_thread
(
task_start
)
;
_exit
(
0
)
;
_exit
(
0
)
;
break
;
break
;
...
@@ -67,6 +73,11 @@ int forward_io ( task_start_t * task_start )
...
@@ -67,6 +73,11 @@ int forward_io ( task_start_t * task_start )
goto
kill_stdin_thread
;
goto
kill_stdin_thread
;
break
;
break
;
case
0
:
/*CHILD*/
case
0
:
/*CHILD*/
close
(
pipes
[
CHILD_IN_RD_PIPE
]
);
close
(
pipes
[
CHILD_IN_WR_PIPE
]
);
close
(
pipes
[
CHILD_OUT_WR_PIPE
]
);
close
(
pipes
[
CHILD_ERR_RD_PIPE
]
);
close
(
pipes
[
CHILD_ERR_WR_PIPE
]
);
stdout_io_pipe_thread
(
task_start
)
;
stdout_io_pipe_thread
(
task_start
)
;
_exit
(
0
)
;
_exit
(
0
)
;
break
;
break
;
...
@@ -81,6 +92,11 @@ int forward_io ( task_start_t * task_start )
...
@@ -81,6 +92,11 @@ int forward_io ( task_start_t * task_start )
goto
kill_stdout_thread
;
goto
kill_stdout_thread
;
break
;
break
;
case
0
:
/*CHILD*/
case
0
:
/*CHILD*/
close
(
pipes
[
CHILD_IN_RD_PIPE
]
);
close
(
pipes
[
CHILD_IN_WR_PIPE
]
);
close
(
pipes
[
CHILD_OUT_RD_PIPE
]
);
close
(
pipes
[
CHILD_OUT_WR_PIPE
]
);
close
(
pipes
[
CHILD_ERR_WR_PIPE
]
);
stderr_io_pipe_thread
(
task_start
)
;
stderr_io_pipe_thread
(
task_start
)
;
_exit
(
0
)
;
_exit
(
0
)
;
break
;
break
;
...
@@ -91,11 +107,11 @@ int forward_io ( task_start_t * task_start )
...
@@ -91,11 +107,11 @@ int forward_io ( task_start_t * task_start )
goto
return_label
;
goto
return_label
;
kill_stdout_thread:
kill_stdout_thread:
kill
(
task_start
->
io_pthread_id
[
STDOUT_FILENO
]
,
SIGKILL
);
kill
(
task_start
->
io_pthread_id
[
STDOUT_FILENO
]
,
SIGKILL
);
kill_stdin_thread:
kill_stdin_thread:
kill
(
task_start
->
io_pthread_id
[
STDIN_FILENO
]
,
SIGKILL
);
kill
(
task_start
->
io_pthread_id
[
STDIN_FILENO
]
,
SIGKILL
);
return_label:
return_label:
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
...
...
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