Ensure default SIGPIPE handler for --pipe (rhbz#444389)
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 2 May 2008 08:40:29 +0000 (11:40 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 2 May 2008 08:40:29 +0000 (11:40 +0300)
rpmqv.c

diff --git a/rpmqv.c b/rpmqv.c
index 400b816..1d8c2fc 100644 (file)
--- a/rpmqv.c
+++ b/rpmqv.c
@@ -583,6 +583,7 @@ int main(int argc, char *argv[])
        (void) pipe(p);
 
        if (!(pipeChild = fork())) {
+           (void) signal(SIGPIPE, SIG_DFL);
            (void) close(p[1]);
            (void) dup2(p[0], STDIN_FILENO);
            (void) close(p[0]);