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
cc0e2956
Commit
cc0e2956
authored
14 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
comment why we require salloc to run in the foreground
parent
4831b79d
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/salloc/salloc.c
+5
-1
5 additions, 1 deletion
src/salloc/salloc.c
with
5 additions
and
1 deletion
src/salloc/salloc.c
+
5
−
1
View file @
cc0e2956
...
@@ -165,7 +165,11 @@ int main(int argc, char *argv[])
...
@@ -165,7 +165,11 @@ int main(int argc, char *argv[])
is_interactive
=
isatty
(
STDIN_FILENO
);
is_interactive
=
isatty
(
STDIN_FILENO
);
if
(
is_interactive
)
{
if
(
is_interactive
)
{
bool
sent_msg
=
false
;
bool
sent_msg
=
false
;
/* Wait as long as we are running in the background */
/*
* Job control: interactive sub-processes run in the foreground
* process group of the controlling terminal. In order to grant
* this (tcsetpgrp), salloc needs to be in the foreground first.
*/
while
(
tcgetpgrp
(
STDIN_FILENO
)
!=
(
pid
=
getpgrp
()))
{
while
(
tcgetpgrp
(
STDIN_FILENO
)
!=
(
pid
=
getpgrp
()))
{
if
(
!
sent_msg
)
{
if
(
!
sent_msg
)
{
error
(
"Waiting for program to be placed in "
error
(
"Waiting for program to be placed in "
...
...
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