From 63882fb2201c834db57c9b9287ff9349310f7dde Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 7 May 2010 22:50:22 +0100 Subject: [PATCH] daemon: Use parens around code section for safety. --- daemon/guestfsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index cd51f44..ef28d9b 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)) -- 1.8.3.1