From: Daniel P. Berrange Date: Mon, 6 Jul 2009 17:43:38 +0000 (+0100) Subject: Ensure spawned children have a stderr/out set to /dev/null if requested X-Git-Tag: v0.7.0~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf5343d23332b87382e4ac632e670ce1e07fe0c1;p=thirdparty%2Flibvirt.git Ensure spawned children have a stderr/out set to /dev/null if requested --- diff --git a/src/util.c b/src/util.c index f82cddcb11..178ff0c810 100644 --- a/src/util.c +++ b/src/util.c @@ -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) {