- change sigpipe fix

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=124
This commit is contained in:
Michael Schröder 2011-06-08 10:04:06 +00:00 committed by Git OBS Bridge
parent 34b8c2b971
commit 8a32b9f326
2 changed files with 19 additions and 1 deletions

View File

@ -1,5 +1,5 @@
--- build/rpmfc.c.orig 2011-06-06 11:27:32.000000000 +0000
+++ build/rpmfc.c 2011-06-06 11:28:47.000000000 +0000
+++ build/rpmfc.c 2011-06-08 10:00:38.000000000 +0000
@@ -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 */
@ -15,3 +15,15 @@
close(_sigpipe[0]);
close(_sigpipe[1]);
_sigpipe[0] = -1;
@@ -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;
}
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jun 8 12:02:51 CEST 2011 - mls@suse.de
- change sigpipe fix so that the code really reads everything
from the pipe
-------------------------------------------------------------------
Mon Jun 6 14:16:49 UTC 2011 - coolo@novell.com