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
78275d34
Commit
78275d34
authored
8 years ago
by
Tim Wickberg
Browse files
Options
Downloads
Patches
Plain Diff
Correct spelling of 'shepherd' in srun_job.c.
No functional change.
parent
46a3fa08
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/srun/libsrun/srun_job.c
+21
-21
21 additions, 21 deletions
src/srun/libsrun/srun_job.c
with
21 additions
and
21 deletions
src/srun/libsrun/srun_job.c
+
21
−
21
View file @
78275d34
...
@@ -101,7 +101,7 @@ typedef struct allocation_info {
...
@@ -101,7 +101,7 @@ typedef struct allocation_info {
uint32_t
stepid
;
uint32_t
stepid
;
}
allocation_info_t
;
}
allocation_info_t
;
static
int
shep
a
rd_fd
=
-
1
;
static
int
shep
he
rd_fd
=
-
1
;
static
pthread_t
signal_thread
=
(
pthread_t
)
0
;
static
pthread_t
signal_thread
=
(
pthread_t
)
0
;
static
int
pty_sigarray
[]
=
{
SIGWINCH
,
0
};
static
int
pty_sigarray
[]
=
{
SIGWINCH
,
0
};
...
@@ -127,8 +127,8 @@ static void _set_prio_process_env(void);
...
@@ -127,8 +127,8 @@ static void _set_prio_process_env(void);
static
int
_set_rlimit_env
(
void
);
static
int
_set_rlimit_env
(
void
);
static
void
_set_submit_dir_env
(
void
);
static
void
_set_submit_dir_env
(
void
);
static
int
_set_umask_env
(
void
);
static
int
_set_umask_env
(
void
);
static
void
_shep
a
rd_notify
(
int
shep
a
rd_fd
);
static
void
_shep
he
rd_notify
(
int
shep
he
rd_fd
);
static
int
_shep
a
rd_spawn
(
srun_job_t
*
job
,
bool
got_alloc
);
static
int
_shep
he
rd_spawn
(
srun_job_t
*
job
,
bool
got_alloc
);
static
void
*
_srun_signal_mgr
(
void
*
no_data
);
static
void
*
_srun_signal_mgr
(
void
*
no_data
);
static
void
_step_opt_exclusive
(
void
);
static
void
_step_opt_exclusive
(
void
);
static
int
_validate_relative
(
resource_allocation_response_msg_t
*
resp
);
static
int
_validate_relative
(
resource_allocation_response_msg_t
*
resp
);
...
@@ -648,7 +648,7 @@ extern void create_srun_job(srun_job_t **p_job, bool *got_alloc,
...
@@ -648,7 +648,7 @@ extern void create_srun_job(srun_job_t **p_job, bool *got_alloc,
* Spawn process to insure clean-up of job and/or step
* Spawn process to insure clean-up of job and/or step
* on abnormal termination
* on abnormal termination
*/
*/
shep
a
rd_fd
=
_shep
a
rd_spawn
(
job
,
*
got_alloc
);
shep
he
rd_fd
=
_shep
he
rd_spawn
(
job
,
*
got_alloc
);
}
}
*
p_job
=
job
;
*
p_job
=
job
;
...
@@ -696,7 +696,7 @@ extern void fini_srun(srun_job_t *job, bool got_alloc, uint32_t *global_rc,
...
@@ -696,7 +696,7 @@ extern void fini_srun(srun_job_t *job, bool got_alloc, uint32_t *global_rc,
else
else
slurm_complete_job
(
job
->
jobid
,
*
global_rc
);
slurm_complete_job
(
job
->
jobid
,
*
global_rc
);
}
}
_shep
a
rd_notify
(
shep
a
rd_fd
);
_shep
he
rd_notify
(
shep
he
rd_fd
);
cleanup:
cleanup:
if
(
signal_thread
)
{
if
(
signal_thread
)
{
...
@@ -1339,47 +1339,47 @@ static int _set_umask_env(void)
...
@@ -1339,47 +1339,47 @@ static int _set_umask_env(void)
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
static
void
_shep
a
rd_notify
(
int
shep
a
rd_fd
)
static
void
_shep
he
rd_notify
(
int
shep
he
rd_fd
)
{
{
int
rc
;
int
rc
;
while
(
1
)
{
while
(
1
)
{
rc
=
write
(
shep
a
rd_fd
,
""
,
1
);
rc
=
write
(
shep
he
rd_fd
,
""
,
1
);
if
(
rc
==
-
1
)
{
if
(
rc
==
-
1
)
{
if
((
errno
==
EAGAIN
)
||
(
errno
==
EINTR
))
if
((
errno
==
EAGAIN
)
||
(
errno
==
EINTR
))
continue
;
continue
;
error
(
"write(shep
a
rd): %m"
);
error
(
"write(shep
he
rd): %m"
);
}
}
break
;
break
;
}
}
close
(
shep
a
rd_fd
);
close
(
shep
he
rd_fd
);
}
}
static
int
_shep
a
rd_spawn
(
srun_job_t
*
job
,
bool
got_alloc
)
static
int
_shep
he
rd_spawn
(
srun_job_t
*
job
,
bool
got_alloc
)
{
{
int
shep
a
rd_pipe
[
2
],
rc
;
int
shep
he
rd_pipe
[
2
],
rc
;
pid_t
shep
a
rd_pid
;
pid_t
shep
he
rd_pid
;
char
buf
[
1
];
char
buf
[
1
];
if
(
pipe
(
shep
a
rd_pipe
))
{
if
(
pipe
(
shep
he
rd_pipe
))
{
error
(
"pipe: %m"
);
error
(
"pipe: %m"
);
return
-
1
;
return
-
1
;
}
}
shep
a
rd_pid
=
fork
();
shep
he
rd_pid
=
fork
();
if
(
shep
a
rd_pid
==
-
1
)
{
if
(
shep
he
rd_pid
==
-
1
)
{
error
(
"fork: %m"
);
error
(
"fork: %m"
);
return
-
1
;
return
-
1
;
}
}
if
(
shep
a
rd_pid
!=
0
)
{
if
(
shep
he
rd_pid
!=
0
)
{
close
(
shep
a
rd_pipe
[
0
]);
close
(
shep
he
rd_pipe
[
0
]);
return
shep
a
rd_pipe
[
1
];
return
shep
he
rd_pipe
[
1
];
}
}
/* Wait for parent to notify of completion or I/O error on abort */
/* Wait for parent to notify of completion or I/O error on abort */
close
(
shep
a
rd_pipe
[
1
]);
close
(
shep
he
rd_pipe
[
1
]);
while
(
1
)
{
while
(
1
)
{
rc
=
read
(
shep
a
rd_pipe
[
0
],
buf
,
1
);
rc
=
read
(
shep
he
rd_pipe
[
0
],
buf
,
1
);
if
(
rc
==
1
)
{
if
(
rc
==
1
)
{
exit
(
0
);
exit
(
0
);
}
else
if
(
rc
==
0
)
{
}
else
if
(
rc
==
0
)
{
...
@@ -1490,6 +1490,6 @@ static int _validate_relative(resource_allocation_response_msg_t *resp)
...
@@ -1490,6 +1490,6 @@ static int _validate_relative(resource_allocation_response_msg_t *resp)
static
void
_call_spank_fini
(
void
)
static
void
_call_spank_fini
(
void
)
{
{
if
(
-
1
!=
shep
a
rd_fd
)
if
(
-
1
!=
shep
he
rd_fd
)
spank_fini
(
NULL
);
spank_fini
(
NULL
);
}
}
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