aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar startx2017 <vradu.startx@yandex.com>2018-10-18 08:14:13 -0400
committerLibravatar startx2017 <vradu.startx@yandex.com>2018-10-18 08:14:13 -0400
commit73855cd93719d49922e094ba726f6a16d2efd003 (patch)
tree8a1ea90cc24b3141b4bf508aa3ee0bb7446fe5b2
parentstatus (diff)
downloadfirejail-73855cd93719d49922e094ba726f6a16d2efd003.tar.gz
firejail-73855cd93719d49922e094ba726f6a16d2efd003.tar.zst
firejail-73855cd93719d49922e094ba726f6a16d2efd003.zip
mainline merge: Make --join return exit code of the invoked program
-rw-r--r--src/firejail/join.c14
-rw-r--r--status3
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}
diff --git a/status b/status
index b3d41cbef..76cc53b92 100644
--- a/status
+++ b/status
@@ -1,5 +1,8 @@
1todo - Oct 13: update profiles, README
2todo - Oct 17: Fix docs on default seccomp list: change mfsservctl -> nfsservctl and…
1 3
2Oct 17: improve clean_pathname function 4Oct 17: improve clean_pathname function
5Oct 14: Make --join return exit code of the invoked program
3 6
4Oct 12: full merge 7Oct 12: full merge
5done: fs_whitelist: no warning if macro resolution fails because of missing… 8done: fs_whitelist: no warning if macro resolution fails because of missing…