From d380a36c573aff51e46df7a305725e78062ec787 Mon Sep 17 00:00:00 2001 From: Marc Alexander Lehmann Date: Sat, 3 Nov 2007 09:19:58 +0000 Subject: [PATCH] add rpid/rstatus --- ev.c | 3 ++- ev.h | 5 +++-- ev_select.c | 4 +++- evdns.c | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ev.c b/ev.c index 7faa403..6c2f397 100644 --- a/ev.c +++ b/ev.c @@ -487,7 +487,8 @@ childcb (struct ev_signal *sw, int revents) for (w = childs [pid & (PID_HASHSIZE - 1)]; w; w = w->next) if (w->pid == pid || !w->pid) { - w->status = status; + w->rpid = pid; + w->rstatus = status; event ((W)w, EV_CHILD); } } diff --git a/ev.h b/ev.h index 6e0e0bd..8d2922d 100644 --- a/ev.h +++ b/ev.h @@ -172,8 +172,9 @@ struct ev_child { EV_WATCHER_LIST (ev_child); - int pid; /* ro */ - int status; /* rw, holds the exit status, use the macros from sys/wait.h */ + int pid; /* ro */ + int rpid; /* rw, holds the received pid */ + int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */ }; #define EVMETHOD_AUTO 0 /* consults environment */ diff --git a/ev_select.c b/ev_select.c index 0333d63..a0db3b6 100644 --- a/ev_select.c +++ b/ev_select.c @@ -35,7 +35,9 @@ #include /* for unix systems */ -#include +#ifndef WIN32 +# include +#endif #include #include diff --git a/evdns.c b/evdns.c index fa81f38..78fbd3c 100644 --- a/evdns.c +++ b/evdns.c @@ -41,7 +41,6 @@ #endif #ifdef WIN32 -#include "misc.h" #endif /* #define NDEBUG */