+Wed May 21 15:42:29 EST 2008 Daniel P. Berrange <berrange@redhat.com>
+
+ * src/qemu_conf.c: Run qemu with -help and don't pollute
+ libvirtd environment
+
Tue May 20 12:15:29 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* qemud/qemud.c: Re-factor daemon startup code to avoid
}
if (child == 0) { /* Kid */
+ /* Just in case QEMU is translated someday we force to C locale.. */
+ const char *const qemuenv[] = { "LANG=C", NULL };
+
if (close(STDIN_FILENO) < 0)
goto cleanup1;
if (close(STDERR_FILENO) < 0)
if (dup2(newstdout[1], STDOUT_FILENO) < 0)
goto cleanup1;
- /* Just in case QEMU is translated someday.. */
- setenv("LANG", "C", 1);
- execl(qemu, qemu, (char*)NULL);
+ /* Passing -help, rather than relying on no-args which doesn't
+ always work */
+ execle(qemu, qemu, "-help", (char*)NULL, qemuenv);
cleanup1:
_exit(-1); /* Just in case */