
On Mon, Feb 02, 2009 at 06:08:15PM +0100, Jim Meyering wrote:
From: Jim Meyering <meyering@redhat.com>
* src/qemu_driver.c: Use virSetCloseExec and virSetNonBlock, rather than qemuSet* functions. Suggested by Daniel P. Berrange. * src/util.c (virSetCloseExec): Compile unconditionally. * src/util.h (virSetCloseExec): Declare
diff --git a/qemud/Makefile.am b/qemud/Makefile.am index a0c161a..372b931 100644 --- a/qemud/Makefile.am +++ b/qemud/Makefile.am @@ -107,6 +107,7 @@ libvirtd_LDADD = \ if ! WITH_DRIVER_MODULES if WITH_QEMU libvirtd_LDADD += ../src/libvirt_driver_qemu.la +libvirtd_LDADD += ../src/libvirt_util.la endif
This is not required. All the functions in util.c are provided in the libvirt.so, and exported with LIBVIRT_PRIVATE_X_X_X tag. This patch is missing the change to libvirt_private.sym to actually add the virSetCloseExec function though.
@@ -182,10 +182,7 @@ int virSetNonBlock(int fd) { return 0; }
- -#ifndef WIN32 - -static int virSetCloseExec(int fd) { +int virSetCloseExec(int fd) { int flags; if ((flags = fcntl(fd, F_GETFD)) < 0) return -1; @@ -195,6 +192,8 @@ static int virSetCloseExec(int fd) { return 0; }
+#ifndef WIN32 + static int __virExec(virConnectPtr conn, const char *const*argv,
Why this change ? AFAIK, there is no close-on-exec flag in Win32, since it doesn't have any concept of exec(). The QEMU driver isn't built on Win32, so we shouldn't need to expose virSetCloseExec there anyway. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|