aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sshfs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sshfs.c b/sshfs.c
index 3edd1ab..88f3fa0 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -4173,6 +4173,13 @@ int main(int argc, char *argv[])
exit(1);
}
+ res = fuse_set_signal_handlers(fuse_get_session(fuse));
+ if (res == -1) {
+ fuse_unmount(mountpoint, ch);
+ fuse_destroy(fuse);
+ exit(1);
+ }
+
/*
* FIXME: trim $PATH so it doesn't contain anything inside the
* mountpoint, which would deadlock.
@@ -4185,9 +4192,6 @@ int main(int argc, char *argv[])
}
res = fuse_daemonize(foreground);
- if (res != -1)
- res = fuse_set_signal_handlers(fuse_get_session(fuse));
-
if (res == -1) {
fuse_unmount(mountpoint, ch);
fuse_destroy(fuse);