diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/helper.c | 7 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2006-01-06 Miklos Szeredi <miklos@szeredi.hu> + + * Change working directory to "/" even if running in the + foreground. Patch from Jonathan Brandmeyer + 2006-01-02 Miklos Szeredi <miklos@szeredi.hu> * mount.fuse: the 'user' option should be ignored. Report and diff --git a/lib/helper.c b/lib/helper.c index 1e46476..38f048b 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -273,6 +273,13 @@ static struct fuse *fuse_setup_common(int argc, char *argv[], perror("fuse: failed to daemonize program\n"); goto err_destroy; } + } else { + /* Ensure consistant behavior across debug and normal modes */ + res = chdir("/"); + if (res == -1) { + perror("fuse: failed to change working directory to /\n"); + goto err_destroy; + } } res = set_signal_handlers(); |