aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVassili Tchersky <vt+git@vbcy.org>2025-02-17 08:54:10 +0100
committerBernd Schubert <bernd@bsbernd.com>2025-02-18 18:11:00 +0100
commitf665917e93509183eb798a1c9862f6cb851b7530 (patch)
tree043105fc4a6fc5b1fc639c58354a5f807560c43d
parent124ceb7382d5d13436d9bf47a8df349880a40c52 (diff)
downloadlibfuse-f665917e93509183eb798a1c9862f6cb851b7530.tar.gz
mount_bsd: Proper exit calls
Use _exit() instead of exit() inside children Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
-rw-r--r--lib/mount_bsd.c8
1 files 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) {