… | |
… | |
727 | int pid, status; |
727 | int pid, status; |
728 | |
728 | |
729 | if (0 < (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED))) |
729 | if (0 < (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED))) |
730 | { |
730 | { |
731 | /* make sure we are called again until all childs have been reaped */ |
731 | /* make sure we are called again until all childs have been reaped */ |
|
|
732 | /* we need to do it this way so that the callback gets called before we continue */ |
732 | ev_feed_event (EV_A_ (W)sw, EV_SIGNAL); |
733 | ev_feed_event (EV_A_ (W)sw, EV_SIGNAL); |
733 | |
734 | |
734 | child_reap (EV_A_ sw, pid, pid, status); |
735 | child_reap (EV_A_ sw, pid, pid, status); |
735 | child_reap (EV_A_ sw, 0, pid, status); /* this might trigger a watcher twice, but event catches that */ |
736 | child_reap (EV_A_ sw, 0, pid, status); /* this might trigger a watcher twice, but feed_event catches that */ |
736 | } |
737 | } |
737 | } |
738 | } |
738 | |
739 | |
739 | #endif |
740 | #endif |
740 | |
741 | |
… | |
… | |
795 | } |
796 | } |
796 | |
797 | |
797 | unsigned int |
798 | unsigned int |
798 | ev_recommended_backends (void) |
799 | ev_recommended_backends (void) |
799 | { |
800 | { |
800 | unsigned int flags = ev_recommended_backends (); |
801 | unsigned int flags = ev_supported_backends (); |
801 | |
802 | |
802 | #ifndef __NetBSD__ |
803 | #ifndef __NetBSD__ |
803 | /* kqueue is borked on everything but netbsd apparently */ |
804 | /* kqueue is borked on everything but netbsd apparently */ |
804 | /* it usually doesn't work correctly on anything but sockets and pipes */ |
805 | /* it usually doesn't work correctly on anything but sockets and pipes */ |
805 | flags &= ~EVBACKEND_KQUEUE; |
806 | flags &= ~EVBACKEND_KQUEUE; |