[PATCH 1/3] Don't use virSetCloseExec in event loop on Win32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The virSetCloseExec API returns -1 on Win32 since it cannot
possibly work. Avoid calling it from the event loop since
is not required in this case.

* src/util/event_poll.c: Remove virSetCloseExec
---
 src/util/event_poll.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/util/event_poll.c b/src/util/event_poll.c
index 91000e2..90788a4 100644
--- a/src/util/event_poll.c
+++ b/src/util/event_poll.c
@@ -658,10 +658,12 @@ int virEventPollInit(void)
     }
 
     if (pipe(eventLoop.wakeupfd) < 0 ||
-        virSetNonBlock(eventLoop.wakeupfd[0]) < 0 ||
-        virSetNonBlock(eventLoop.wakeupfd[1]) < 0 ||
+#ifndef WIN32
         virSetCloseExec(eventLoop.wakeupfd[0]) < 0 ||
-        virSetCloseExec(eventLoop.wakeupfd[1]) < 0) {
+        virSetCloseExec(eventLoop.wakeupfd[1]) < 0 ||
+#endif
+        virSetNonBlock(eventLoop.wakeupfd[0]) < 0 ||
+        virSetNonBlock(eventLoop.wakeupfd[1]) < 0) {
         virReportSystemError(errno, "%s",
                              _("Unable to setup wakeup pipe"));
         return -1;
-- 
1.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]