diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2010-11-08 15:47:36 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2010-11-08 15:47:36 +0100 |
commit | 9b2ab7ebed39ab680e0d9a489e213cb8c4f49970 (patch) | |
tree | 87a8f7969334227c5593bcd200cf2a127c892567 | |
parent | bd99f9cf24e16643752b02fb4fa7b48f2124ab4e (diff) |
Open /dev/null for write
Open /dev/null for write instead of read for redirecting stdout and
stderr
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | lib/mount_util.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -2,6 +2,9 @@ * Fix check for read-only fs in mtab update + * Open /dev/null for write instead of read for redirecting stdout + and stderr + 2010-10-14 Miklos Szeredi <miklos@szeredi.hu> * Use LTLIBICONV when linking libfuse. This fixes building against diff --git a/lib/mount_util.c b/lib/mount_util.c index dbf9219..25b7e43 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -163,7 +163,7 @@ static int add_mount(const char *progname, const char *fsname, * Hide output, because old versions don't support * --no-canonicalize */ - int fd = open("/dev/null", O_RDONLY); + int fd = open("/dev/null", O_WRONLY); dup2(fd, 1); dup2(fd, 2); |