* .gnulib: Update to latest, for pipe2.
* bootstrap.conf (gnulib_modules): Add pipe2.
* src/util/event_poll.c (virEventPollInit): Use it, to avoid
problematic virSetCloseExec on mingw.
-Subproject commit f79652003534e496bca1e49922ca521f12ca8051
+Subproject commit bd5d1e621103ea3f7fbae09010348ce2df563808
perror
physmem
pipe-posix
+pipe2
poll
posix-shell
pthread
#include <sys/time.h>
#include <errno.h>
#include <unistd.h>
+#include <fcntl.h>
#include "threads.h"
#include "logging.h"
return -1;
}
- if (pipe(eventLoop.wakeupfd) < 0 ||
- virSetNonBlock(eventLoop.wakeupfd[0]) < 0 ||
- virSetNonBlock(eventLoop.wakeupfd[1]) < 0 ||
- virSetCloseExec(eventLoop.wakeupfd[0]) < 0 ||
- virSetCloseExec(eventLoop.wakeupfd[1]) < 0) {
+ if (pipe2(eventLoop.wakeupfd, O_CLOEXEC | O_NONBLOCK) < 0) {
virReportSystemError(errno, "%s",
_("Unable to setup wakeup pipe"));
return -1;