Browse Source

add rpid/rstatus

master
Marc Alexander Lehmann 14 years ago
parent
commit
d380a36c57
  1. 3
      ev.c
  2. 5
      ev.h
  3. 4
      ev_select.c
  4. 1
      evdns.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

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

4
ev_select.c

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

1
evdns.c

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

Loading…
Cancel
Save