diff options
author | Richard Jones <rjones@redhat.com> | 2010-05-07 22:50:22 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-07 22:51:20 +0100 |
commit | 63882fb2201c834db57c9b9287ff9349310f7dde (patch) | |
tree | 372cf3bf2ce948a56ff169ce67b3b49ce5a0350f /daemon/guestfsd.c | |
parent | fc6dd9daa13ac774156d0822b5aa7830171feb85 (diff) | |
download | libguestfs-63882fb2201c834db57c9b9287ff9349310f7dde.tar.gz libguestfs-63882fb2201c834db57c9b9287ff9349310f7dde.tar.xz libguestfs-63882fb2201c834db57c9b9287ff9349310f7dde.zip |
daemon: Use parens around code section for safety.
Diffstat (limited to 'daemon/guestfsd.c')
-rw-r--r-- | daemon/guestfsd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index cd51f442..ef28d9b6 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -781,9 +781,10 @@ commandrvf (char **stdoutput, char **stderror, int flags, dup2 (stdin_fd[0], 0); close (stdin_fd[0]); close (stdin_fd[1]); - } else + } else { /* Set stdin to /dev/null (ignore failure) */ open ("/dev/null", O_RDONLY); + } close (so_fd[0]); close (se_fd[0]); if (!(flags & COMMAND_FLAG_FOLD_STDOUT_ON_STDERR)) |