summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2023-03-17 09:04:28 +0000
committerNikolaus Rath <Nikolaus@rath.org>2023-05-08 16:17:03 -0700
commitfdffde0db657cbc2d63172db8ead53d31cc41d0e (patch)
treec1ae692aade8cb931ef8cc5c83d4c44772aca408
parentfcd293f675fc7bfa0522186c5d68ef932eec6945 (diff)
downloadfuse-fdffde0db657cbc2d63172db8ead53d31cc41d0e.tar.gz
Do not daemonize to early
fuse_session_mount() may print errors to stderr, if we daemonize before that than these are lost.
-rw-r--r--example/passthrough_hp.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc
index a0480e5..53efd9f 100644
--- a/example/passthrough_hp.cc
+++ b/example/passthrough_hp.cc
@@ -1288,8 +1288,6 @@ int main(int argc, char *argv[]) {
// Don't apply umask, use modes exactly as specified
umask(0);
- fuse_daemonize(fs.foreground);
-
// Mount and run main loop
loop_config = fuse_loop_cfg_create();
@@ -1298,6 +1296,9 @@ int main(int argc, char *argv[]) {
if (fuse_session_mount(se, argv[2]) != 0)
goto err_out3;
+
+ fuse_daemonize(fs.foreground);
+
if (options.count("single"))
ret = fuse_session_loop(se);
else