From 8af70b496cac0f69a4b2835bc5388a8e327725a8 Mon Sep 17 00:00:00 2001 From: Vassili Tchersky Date: Mon, 17 Feb 2025 08:54:10 +0100 Subject: [PATCH] mount_bsd: Proper exit calls Use _exit() instead of exit() inside children Signed-off-by: Vassili Tchersky --- lib/mount_bsd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) { -- 2.30.2