diff options
-rw-r--r-- | src/firejail/join.c | 14 | ||||
-rw-r--r-- | status | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/firejail/join.c b/src/firejail/join.c index 569cfcff7..731842275 100644 --- a/src/firejail/join.c +++ b/src/firejail/join.c | |||
@@ -386,8 +386,18 @@ void join(pid_t pid, int argc, char **argv, int index) { | |||
386 | // it will never get here!!! | 386 | // it will never get here!!! |
387 | } | 387 | } |
388 | 388 | ||
389 | int status = 0; | ||
389 | // wait for the child to finish | 390 | // wait for the child to finish |
390 | waitpid(child, NULL, 0); | 391 | waitpid(child, &status, 0); |
391 | flush_stdin(); | 392 | flush_stdin(); |
392 | exit(0); | 393 | |
394 | if (WIFEXITED(status)) { | ||
395 | status = WEXITSTATUS(status); | ||
396 | } else if (WIFSIGNALED(status)) { | ||
397 | status = WTERMSIG(status); | ||
398 | } else { | ||
399 | status = 0; | ||
400 | } | ||
401 | |||
402 | exit(status); | ||
393 | } | 403 | } |
@@ -1,5 +1,8 @@ | |||
1 | todo - Oct 13: update profiles, README | ||
2 | todo - Oct 17: Fix docs on default seccomp list: change mfsservctl -> nfsservctl and… | ||
1 | 3 | ||
2 | Oct 17: improve clean_pathname function | 4 | Oct 17: improve clean_pathname function |
5 | Oct 14: Make --join return exit code of the invoked program | ||
3 | 6 | ||
4 | Oct 12: full merge | 7 | Oct 12: full merge |
5 | done: fs_whitelist: no warning if macro resolution fails because of missing… | 8 | done: fs_whitelist: no warning if macro resolution fails because of missing… |