mirror of /home/gitosis/repositories/libev.git
add rpid/rstatus
This commit is contained in:
parent
334c0b8fd3
commit
d380a36c57
3
ev.c
3
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);
|
||||
}
|
||||
}
|
||||
|
|
5
ev.h
5
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 */
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue