[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 1/4] daemon: Reset SIGPIPE to default before running subprocesses.



(Note the daemon ignores SIGPIPE.)

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
>From 42938f6faf9e724130be28f8e67d3c291bb81cba Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones redhat com>
Date: Fri, 1 Apr 2011 15:26:46 +0100
Subject: [PATCH 1/4] daemon: Reset SIGPIPE to default before running subprocesses.

---
 daemon/guestfsd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 1af0f7a..3632889 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -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);
-- 
1.7.4.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]