From: Vassili Tchersky Date: Mon, 17 Feb 2025 07:54:10 +0000 (+0100) Subject: mount_bsd: Proper exit calls X-Git-Tag: fuse-3.17.1-rc1~6 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8af70b496cac0f69a4b2835bc5388a8e327725a8;p=qemu-gpiodev%2Flibfuse.git mount_bsd: Proper exit calls Use _exit() instead of exit() inside children Signed-off-by: Vassili Tchersky --- diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c index 789f61b..ba17240 100644 --- a/lib/mount_bsd.c +++ b/lib/mount_bsd.c @@ -189,7 +189,7 @@ mount: const char *argv[32]; int a = 0; int ret = -1; - + if (! fdnam) { ret = asprintf(&fdnam, "%ld", fd); @@ -197,7 +197,7 @@ mount: { perror("fuse: failed to assemble mount arguments"); close(fd); - exit(1); + _exit(EXIT_FAILURE); } } @@ -212,10 +212,10 @@ mount: execvp(mountprog, (char **) argv); perror("fuse: failed to exec mount program"); free(fdnam); - exit(1); + _exit(EXIT_FAILURE); } - exit(0); + _exit(EXIT_SUCCESS); } if (waitpid(cpid, &status, 0) == -1 || WEXITSTATUS(status) != 0) {