]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Ensure spawned children have a stderr/out set to /dev/null if requested
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 6 Jul 2009 17:43:38 +0000 (18:43 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 16 Jul 2009 09:53:21 +0000 (10:53 +0100)
src/util.c

index f82cddcb11ed1d921c39d1dddaf94ae8a850f4f7..178ff0c81004c787d1143d216fbac1aa6ed586fe 100644 (file)
@@ -376,6 +376,8 @@ __virExec(virConnectPtr conn,
         } else {
             childout = *outfd;
         }
+    } else {
+        childout = null;
     }
 
     if (errfd != NULL) {
@@ -403,6 +405,8 @@ __virExec(virConnectPtr conn,
         } else {
             childerr = *errfd;
         }
+    } else {
+        childerr = null;
     }
 
     if ((pid = fork()) < 0) {