… | |
… | |
155 | |
155 | |
156 | /*****************************************************************************/ |
156 | /*****************************************************************************/ |
157 | |
157 | |
158 | typedef struct |
158 | typedef struct |
159 | { |
159 | { |
160 | struct ev_watcher_list *head; |
160 | WL head; |
161 | unsigned char events; |
161 | unsigned char events; |
162 | unsigned char reify; |
162 | unsigned char reify; |
163 | } ANFD; |
163 | } ANFD; |
164 | |
164 | |
165 | typedef struct |
165 | typedef struct |
… | |
… | |
376 | int fd; |
376 | int fd; |
377 | |
377 | |
378 | for (fd = anfdmax; fd--; ) |
378 | for (fd = anfdmax; fd--; ) |
379 | if (anfds [fd].events) |
379 | if (anfds [fd].events) |
380 | { |
380 | { |
381 | close (fd); |
|
|
382 | fd_kill (EV_A_ fd); |
381 | fd_kill (EV_A_ fd); |
383 | return; |
382 | return; |
384 | } |
383 | } |
385 | } |
384 | } |
386 | |
385 | |
… | |
… | |
444 | |
443 | |
445 | /*****************************************************************************/ |
444 | /*****************************************************************************/ |
446 | |
445 | |
447 | typedef struct |
446 | typedef struct |
448 | { |
447 | { |
449 | struct ev_watcher_list *head; |
448 | WL head; |
450 | sig_atomic_t volatile gotsig; |
449 | sig_atomic_t volatile gotsig; |
451 | } ANSIG; |
450 | } ANSIG; |
452 | |
451 | |
453 | static ANSIG *signals; |
452 | static ANSIG *signals; |
454 | static int signalmax; |
453 | static int signalmax; |
… | |
… | |
488 | } |
487 | } |
489 | |
488 | |
490 | static void |
489 | static void |
491 | sigcb (EV_P_ struct ev_io *iow, int revents) |
490 | sigcb (EV_P_ struct ev_io *iow, int revents) |
492 | { |
491 | { |
493 | struct ev_watcher_list *w; |
492 | WL w; |
494 | int signum; |
493 | int signum; |
495 | |
494 | |
496 | read (sigpipe [0], &revents, 1); |
495 | read (sigpipe [0], &revents, 1); |
497 | gotsig = 0; |
496 | gotsig = 0; |
498 | |
497 | |