* src/util.c: fix virRun() to prevent zombies on pipe errors,

patch by Ryota Ozaki
daniel
This commit is contained in:
Daniel Veillard 2009-03-31 12:26:54 +00:00
parent 3b97f7db53
commit b7071653fa
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Tue Mar 31 14:25:18 CEST 2009 Daniel Veillard <veillard@redhat.com>
* src/util.c: fix virRun() to prevent zombies on pipe errors,
patch by Ryota Ozaki
Fri Mar 27 11:44:22 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_driver.c: Don't try to query balloon if guest

View File

@ -681,8 +681,11 @@ virRun(virConnectPtr conn,
goto error;
}
if (virPipeReadUntilEOF(conn, outfd, errfd, &outbuf, &errbuf) < 0)
if (virPipeReadUntilEOF(conn, outfd, errfd, &outbuf, &errbuf) < 0) {
while (waitpid(childpid, &exitstatus, 0) == -1 && errno == EINTR)
;
goto error;
}
if (outbuf)
DEBUG("Command stdout: %s", outbuf);