diff options
Diffstat (limited to 'lib/mount.c')
-rw-r--r-- | lib/mount.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mount.c b/lib/mount.c index 224ae9d..8065087 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -366,8 +366,10 @@ static int fuse_mount_fusermount(const char *mountpoint, const char *opts, if (quiet) { int fd = open("/dev/null", O_RDONLY); - dup2(fd, 1); - dup2(fd, 2); + if (fd != -1) { + dup2(fd, 1); + dup2(fd, 2); + } } argv[a++] = FUSERMOUNT_PROG; |