]> xenbits.xensource.com Git - libvirt.git/commitdiff
* src/util.c: fix virRun() to prevent zombies on pipe errors,
authorDaniel Veillard <veillard@redhat.com>
Tue, 31 Mar 2009 12:26:54 +0000 (12:26 +0000)
committerDaniel Veillard <veillard@redhat.com>
Tue, 31 Mar 2009 12:26:54 +0000 (12:26 +0000)
  patch by Ryota Ozaki
daniel

ChangeLog
src/util.c

index 50d79ad6d2b7b003fa63cda4852c3dc7bbb41f81..33dcc3228d38366bc0dfb80aac5cf3f6f721d392 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index a40ff1760eb539dabd91d17b8adb6aec63638a51..016cb626d7af4c27d30f8570e26faea753f3d0f0 100644 (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);