#include "signals.h"
#include "socket-util.h"
#include "util.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
#include "type-props.h"
static size_t n_hooks;
static int signal_fds[2];
-static HANDLE wevent;
static volatile sig_atomic_t stored_sig_nr = SIG_ATOMIC_MAX;
+#ifdef _WIN32
+static HANDLE wevent;
+#endif
+
static struct ovs_mutex mutex;
static void call_hooks(int sig_nr);
VLOG_WARN("terminating with signal %d", (int)sig_nr);
#endif
call_hooks(sig_nr);
+ fflush(stderr);
/* Re-raise the signal with the default handling so that the program
* termination status reflects that we were killed by this signal */
fatal_signal_wait(void)
{
fatal_signal_init();
- poll_fd_wait_event(signal_fds[0], wevent, POLLIN);
+#ifdef _WIN32
+ poll_wevent_wait(wevent);
+#else
+ poll_fd_wait(signal_fds[0], POLLIN);
+#endif
}
void