2011-06-06 13:32:31 +02:00
|
|
|
--- build/rpmfc.c.orig 2011-06-06 11:27:32.000000000 +0000
|
2011-06-08 12:04:06 +02:00
|
|
|
+++ build/rpmfc.c 2011-06-08 10:00:38.000000000 +0000
|
2011-06-06 13:32:31 +02:00
|
|
|
@@ -165,12 +165,14 @@ static int sigpipe_init(void)
|
|
|
|
fcntl(_sigpipe[1], F_SETFD, (fcntl(_sigpipe[1], F_GETFD)|FD_CLOEXEC));
|
|
|
|
/* XXX SIGPIPE too, but NSPR disables it already, dont mess with it */
|
|
|
|
signal(SIGCHLD, sigpipe_handler);
|
|
|
|
+ signal(SIGPIPE, SIG_IGN);
|
|
|
|
return _sigpipe[0];
|
|
|
|
}
|
|
|
|
|
|
|
|
static void sigpipe_finish(void)
|
|
|
|
{
|
|
|
|
signal(SIGCHLD, SIG_DFL);
|
|
|
|
+ signal(SIGPIPE, SIG_DFL);
|
|
|
|
close(_sigpipe[0]);
|
|
|
|
close(_sigpipe[1]);
|
|
|
|
_sigpipe[0] = -1;
|
2011-06-08 12:04:06 +02:00
|
|
|
@@ -298,10 +300,9 @@ static StringBuf getOutputFrom(ARGV_t ar
|
|
|
|
appendStringBuf(readBuff, buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
- /* Child exited, we're done */
|
|
|
|
+ /* Child exited, we're maybe done */
|
|
|
|
if (FD_ISSET(sigpipe, &ibits)) {
|
|
|
|
while (read(sigpipe, buf, sizeof(buf)) > 0) {};
|
|
|
|
- break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|