summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-04-01 15:26:46 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-04-11 11:07:32 +0100
commitf6c8665a72c3ecadf0b24029f7c6840aafd33c81 (patch)
tree86c5683c9f58497dc637e78d7a516b970e186f42
parent2b0f806e5b207b203c240c22d7e4b25b59b68e24 (diff)
downloadlibguestfs-f6c8665a72c3ecadf0b24029f7c6840aafd33c81.tar.gz
libguestfs-f6c8665a72c3ecadf0b24029f7c6840aafd33c81.tar.xz
libguestfs-f6c8665a72c3ecadf0b24029f7c6840aafd33c81.zip
daemon: Reset SIGPIPE to default before running subprocesses.
(cherry picked from commit 42938f6faf9e724130be28f8e67d3c291bb81cba)
-rw-r--r--daemon/guestfsd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 6a9b60d9..977f170c 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -694,6 +694,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);