summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2007-11-03 09:19:58 +0000
committerroot <root>2007-11-03 09:19:58 +0000
commitf123911c49df152e9b27ab4df77b12a03b6abfa2 (patch)
tree0d76843ddd6b7896440174392f6d2ba7db924662 /ev.c
parent120eeba0bed6b77e91b32b8cd0fb875c314bc092 (diff)
add rpid/rstatus
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ev.c b/ev.c
index cca3a3d..7faa403 100644
--- a/ev.c
+++ b/ev.c
@@ -44,7 +44,9 @@
#include <assert.h>
#include <errno.h>
#include <sys/types.h>
-#include <sys/wait.h>
+#ifndef WIN32
+# include <sys/wait.h>
+#endif
#include <sys/time.h>
#include <time.h>
@@ -440,12 +442,14 @@ sigcb (struct ev_io *iow, int revents)
static void
siginit (void)
{
+#ifndef WIN32
fcntl (sigpipe [0], F_SETFD, FD_CLOEXEC);
fcntl (sigpipe [1], F_SETFD, FD_CLOEXEC);
/* rather than sort out wether we really need nb, set it */
fcntl (sigpipe [0], F_SETFL, O_NONBLOCK);
fcntl (sigpipe [1], F_SETFL, O_NONBLOCK);
+#endif
ev_io_set (&sigev, sigpipe [0], EV_READ);
ev_io_start (&sigev);
@@ -467,6 +471,8 @@ static int checkmax, checkcnt;
static struct ev_child *childs [PID_HASHSIZE];
static struct ev_signal childev;
+#ifndef WIN32
+
#ifndef WCONTINUED
# define WCONTINUED 0
#endif
@@ -486,6 +492,8 @@ childcb (struct ev_signal *sw, int revents)
}
}
+#endif
+
/*****************************************************************************/
#if EV_USE_KQUEUE
@@ -566,8 +574,10 @@ int ev_init (int methods)
ev_watcher_init (&sigev, sigcb);
siginit ();
+#ifndef WIN32
ev_signal_init (&childev, childcb, SIGCHLD);
ev_signal_start (&childev);
+#endif
}
}