Skip to content

Commit

Permalink
Workaround close-on-exec problem in libvirt
Browse files Browse the repository at this point in the history
  • Loading branch information
photron committed Oct 9, 2012
1 parent f9402f1 commit d4aec0d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions libvirt-0.10.2-mingw.patch
Expand Up @@ -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.