… | |
… | |
166 | EV_WATCHER (ev_check); |
166 | EV_WATCHER (ev_check); |
167 | }; |
167 | }; |
168 | |
168 | |
169 | /* invoked when sigchld is received and waitpid indicates the givne pid */ |
169 | /* invoked when sigchld is received and waitpid indicates the givne pid */ |
170 | /* revent EV_CHILD */ |
170 | /* revent EV_CHILD */ |
|
|
171 | /* does not support priorities */ |
171 | struct ev_child |
172 | struct ev_child |
172 | { |
173 | { |
173 | EV_WATCHER_LIST (ev_child); |
174 | EV_WATCHER_LIST (ev_child); |
174 | |
175 | |
175 | int pid; /* ro */ |
176 | int pid; /* ro */ |
|
|
177 | int rpid; /* rw, holds the received pid */ |
176 | int status; /* rw, holds the exit status, use the macros from sys/wait.h */ |
178 | int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */ |
177 | }; |
179 | }; |
178 | |
180 | |
179 | #define EVMETHOD_AUTO 0 /* consults environment */ |
181 | #define EVMETHOD_AUTO 0 /* consults environment */ |
180 | #define EVMETHOD_SELECT 1 |
182 | #define EVMETHOD_SELECT 1 |
181 | #define EVMETHOD_POLL 2 |
183 | #define EVMETHOD_POLL 2 |
182 | #define EVMETHOD_EPOLL 4 |
184 | #define EVMETHOD_EPOLL 4 |
183 | #define EVMETHOD_KQUEUE 8 |
185 | #define EVMETHOD_KQUEUE 8 |
184 | #define EVMETHOD_DEVPOLL 16 |
186 | #define EVMETHOD_DEVPOLL 16 /* NYI */ |
|
|
187 | #define EVMETHOD_PORT 32 /* NYI */ |
185 | #define EVMETHOD_ANY ~0 /* any method, do not consult env */ |
188 | #define EVMETHOD_ANY ~0 /* any method, do not consult env */ |
186 | #if EV_PROTOTYPES |
189 | #if EV_PROTOTYPES |
187 | extern int ev_method; |
190 | extern int ev_method; |
188 | int ev_init (int methods); /* returns ev_method */ |
191 | int ev_init (int methods); /* returns ev_method */ |
189 | int ev_version_major (void); |
192 | int ev_version_major (void); |