Check for pipe() returns in rpmfc helper output reading
This commit is contained in:
parent
b15e3e3ca1
commit
12bb7024fd
|
@ -102,9 +102,11 @@ static StringBuf getOutputFrom(const char * dir, ARGV_t argv,
|
|||
oldhandler = signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
toProg[0] = toProg[1] = 0;
|
||||
(void) pipe(toProg);
|
||||
fromProg[0] = fromProg[1] = 0;
|
||||
(void) pipe(fromProg);
|
||||
if (pipe(toProg) < 0 || pipe(fromProg) < 0) {
|
||||
rpmlog(RPMLOG_ERR, _("Couldn't create pipe for %s: %m\n"), argv[0]);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!(child = fork())) {
|
||||
(void) close(toProg[1]);
|
||||
|
|
Loading…
Reference in New Issue