aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGleb Popov <6yearold@gmail.com>2025-06-05 17:03:25 +0300
committerBernd Schubert <bernd@bsbernd.com>2025-06-10 11:52:06 +0200
commit05cbdf637483157a8455f19ec37f62c22ad24e08 (patch)
treea0f52b79c0405c66d86bf4b282001d951e26059d
parent22f6062f07fbffa9eeb6d491e6e5e3b19395fd46 (diff)
downloadlibfuse-05cbdf637483157a8455f19ec37f62c22ad24e08.tar.gz
mount_bsd.c: Fix race between actual mounting and returning to the caller
Signed-off-by: Gleb Popov <6yearold@gmail.com>
-rw-r--r--lib/mount_bsd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c
index bd95a76..28a9ae5 100644
--- a/lib/mount_bsd.c
+++ b/lib/mount_bsd.c
@@ -187,7 +187,7 @@ mount:
if (pid == 0) {
const char *argv[32];
int a = 0;
- int ret = -1;
+ int ret = -1;
if (! fdnam)
{
@@ -214,6 +214,7 @@ mount:
_exit(EXIT_FAILURE);
}
+ waitpid(pid, &status, 0);
_exit(EXIT_SUCCESS);
}