Skip to content

Commit

Permalink
use _Exit() instead of exit() to exit child processes
Browse files Browse the repository at this point in the history
  • Loading branch information
liberize committed Oct 7, 2024
1 parent 4661c61 commit 936b21d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ FORCE_INLINE std::string mount_squashfs() {
int r = fusefs_main(5, (char**) argv, fuse_mounted); // daemonize on success
if (r != 0)
LOGE("failed to mount squashfs");
exit(r);
_Exit(r);
}

char c;
Expand Down
2 changes: 1 addition & 1 deletion src/untar.h
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,6 @@ FORCE_INLINE int extract_tar_gz_from_mem(char *data, int size)
close(pipe_fds[0]);
int r = gunzip(data, size, pipe_fds[1]);
close(pipe_fds[1]);
exit(r);
_Exit(r);
}
}
2 changes: 1 addition & 1 deletion src/untraceable.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ FORCE_INLINE void check_debugger() {
LOGD("being traced!");
kill(ppid, SIGKILL);
}
exit(0);
_Exit(0);
}
}
#endif

0 comments on commit 936b21d

Please sign in to comment.