diff --git a/NEWS b/NEWS index 4395806fff1e0b170997c8ae8dddd47ea61e1e69..7413a4bbc978e5fea781e9f0e5a8293b1e0b5094 100644 --- a/NEWS +++ b/NEWS @@ -201,6 +201,8 @@ documents those changes that are of interest to users and admins. * Changes in SLURM 2.2.7 ======================== + -- Eliminate zombie process created if salloc exits with stopped child + process. Patch from Gerrit Renker, CSCS. * Changes in SLURM 2.2.6 ======================== diff --git a/src/salloc/salloc.c b/src/salloc/salloc.c index 4cbc9c5fcf8c49912484da33e3e68497f60a8594..57105026631c1488765f7cb333730d4d4151f6dd 100644 --- a/src/salloc/salloc.c +++ b/src/salloc/salloc.c @@ -476,6 +476,9 @@ relinquish: if (WIFEXITED(status)) { rc = WEXITSTATUS(status); + } else if (WIFSTOPPED(status)) { + /* Terminate stopped child process */ + _forward_signal(SIGKILL); } else if (WIFSIGNALED(status)) { verbose("Command \"%s\" was terminated by signal %d", command_argv[0], WTERMSIG(status));