daemon: Reset SIGPIPE to default before running subprocesses.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 1 Apr 2011 14:26:46 +0000 (15:26 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 1 Apr 2011 15:05:30 +0000 (16:05 +0100)
daemon/guestfsd.c

index 1af0f7a..3632889 100644 (file)
@@ -679,6 +679,7 @@ commandrvf (char **stdoutput, char **stderror, int flags,
   }
 
   if (pid == 0) {              /* Child process running the command. */
+    signal (SIGPIPE, SIG_DFL);
     close (0);
     if (flag_copy_stdin) {
       dup2 (stdin_fd[0], 0);