add rpid/rstatus

This commit is contained in:
Marc Alexander Lehmann 2007-11-03 09:19:58 +00:00
parent 334c0b8fd3
commit d380a36c57
4 changed files with 8 additions and 5 deletions

3
ev.c
View File

@ -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);
}
}

5
ev.h
View File

@ -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 */

View File

@ -35,7 +35,9 @@
#include <unistd.h>
/* for unix systems */
#include <sys/select.h>
#ifndef WIN32
# include <sys/select.h>
#endif
#include <string.h>
#include <inttypes.h>

View File

@ -41,7 +41,6 @@
#endif
#ifdef WIN32
#include "misc.h"
#endif
/* #define NDEBUG */