Skip to content
Browse files

Workaround close-on-exec problem in libvirt

  • Loading branch information...
1 parent f9402f1 commit d4aec0d99844b5635811a8f8b37f2d9cdafede15 @photron committed Oct 9, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 libvirt-0.10.2-mingw.patch
View
15 libvirt-0.10.2-mingw.patch
@@ -444,3 +444,18 @@ Make the remote driver use TLS certificates from %APPDATA%\libvirt\pki\ instead
return ret;
no_memory:
+--- a/src/util/util.c
++++ b/src/util/util.c
+@@ -275,7 +275,11 @@ int virSetInherit(int fd, bool inherit) {
+
+ int virSetInherit(int fd ATTRIBUTE_UNUSED, bool inherit ATTRIBUTE_UNUSED)
+ {
+- return -1;
++ /* FIXME: Currently creating child processes is not supported on
++ * Win32, so there is no point in failing calls that are only relevant
++ * when creating child processes. So just pretend that we changed the
++ * inheritance property of the given fd as requested. */
++ return 0;
+ }
+
+ #endif /* WIN32 */

0 comments on commit d4aec0d

Please sign in to comment.
Something went wrong with that request. Please try again.