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-12 23:29:03 +0100
commitad1abf3f2e15d9d23d0a2c60aec6a011762ccfa6 (patch)
tree983504947e18a082f56d88c0a3df8c207f5c93ca
parentdba6b3983af34f30de01cf532dff0b66f0ed6045 (diff)
downloadfuse-ad1abf3f2e15d9d23d0a2c60aec6a011762ccfa6.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