commit 3af282923654b1b92de0c48f24e4ab926b5cf328
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Tue May 2 20:17:38 2017 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Tue May 2 20:18:34 2017 +0200
Fix call to exit in enjoin_jobs
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/src/util.c b/src/util.c
index de520de..8fb4877 100644
--- a/src/util.c
+++ b/src/util.c
_AT_@ -221,8 +221,8 @@ enjoin_jobs(int status, int is_master, pid_t *pids)
for (i = 0; pids[i] != -1; i++) {
if (waitpid(pids[i], &stat, 0) == -1)
enprintf(status, "waitpid:");
- if (stat)
- exit(status);
+ if (status)
+ exit(WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status));
}
free(pids);
}
Received on Tue May 02 2017 - 23:38:49 CEST
This archive was generated by hypermail 2.3.0
: Tue May 02 2017 - 23:48:17 CEST