mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: fix mingw startup
* .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.
This commit is contained in:
2
.gnulib
2
.gnulib
Submodule .gnulib updated: f796520035...bd5d1e6211
@@ -54,6 +54,7 @@ nonblocking
|
||||
perror
|
||||
physmem
|
||||
pipe-posix
|
||||
pipe2
|
||||
poll
|
||||
posix-shell
|
||||
pthread
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "threads.h"
|
||||
#include "logging.h"
|
||||
@@ -657,11 +658,7 @@ int virEventPollInit(void)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user