aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar startx2017 <vradu.startx@yandex.com>2018-10-14 19:02:43 -0400
committerLibravatar startx2017 <vradu.startx@yandex.com>2018-10-14 19:02:43 -0400
commit11033dbf208cacd357b8db53f2ec9d4431b4b551 (patch)
tree30340f5c5e715b3e4cf120c8849c08cde5f037a4
parentmerge commits from crass and grimskies (diff)
parentMerge pull request #2192 from crass/fix-ld.so.preload-path (diff)
downloadfirejail-11033dbf208cacd357b8db53f2ec9d4431b4b551.tar.gz
firejail-11033dbf208cacd357b8db53f2ec9d4431b4b551.tar.zst
firejail-11033dbf208cacd357b8db53f2ec9d4431b4b551.zip
Merge branch 'master' of http://github.com/netblue30/firejail
-rw-r--r--src/firejail/fs_trace.c2
-rw-r--r--src/firejail/join.c14
2 files changed, 13 insertions, 3 deletions
diff --git a/src/firejail/fs_trace.c b/src/firejail/fs_trace.c
index 38ab7e2f8..235e09291 100644
--- a/src/firejail/fs_trace.c
+++ b/src/firejail/fs_trace.c
@@ -51,7 +51,7 @@ void fs_trace(void) {
51 FILE *fp = fopen(RUN_LDPRELOAD_FILE, "w"); 51 FILE *fp = fopen(RUN_LDPRELOAD_FILE, "w");
52 if (!fp) 52 if (!fp)
53 errExit("fopen"); 53 errExit("fopen");
54 const char *prefix = LIBDIR "/firejail"; 54 const char *prefix = RUN_FIREJAIL_LIB_DIR;
55 55
56 if (arg_trace) { 56 if (arg_trace) {
57 fprintf(fp, "%s/libtrace.so\n", prefix); 57 fprintf(fp, "%s/libtrace.so\n", prefix);
diff --git a/src/firejail/join.c b/src/firejail/join.c
index c2b207c52..c849b200c 100644
--- a/src/firejail/join.c
+++ b/src/firejail/join.c
@@ -436,8 +436,18 @@ void join(pid_t pid, int argc, char **argv, int index) {
436 // it will never get here!!! 436 // it will never get here!!!
437 } 437 }
438 438
439 int status = 0;
439 // wait for the child to finish 440 // wait for the child to finish
440 waitpid(child, NULL, 0); 441 waitpid(child, &status, 0);
441 flush_stdin(); 442 flush_stdin();
442 exit(0); 443
444 if (WIFEXITED(status)) {
445 status = WEXITSTATUS(status);
446 } else if (WIFSIGNALED(status)) {
447 status = WTERMSIG(status);
448 } else {
449 status = 0;
450 }
451
452 exit(status);
443} 453}