… | |
… | |
487 | fcntl (sigpipe [1], F_SETFL, O_NONBLOCK); |
487 | fcntl (sigpipe [1], F_SETFL, O_NONBLOCK); |
488 | #endif |
488 | #endif |
489 | |
489 | |
490 | ev_io_set (&sigev, sigpipe [0], EV_READ); |
490 | ev_io_set (&sigev, sigpipe [0], EV_READ); |
491 | ev_io_start (&sigev); |
491 | ev_io_start (&sigev); |
|
|
492 | ev_unref (EV_A); /* child watcher should not keep loop alive */ |
492 | } |
493 | } |
493 | |
494 | |
494 | /*****************************************************************************/ |
495 | /*****************************************************************************/ |
495 | |
496 | |
496 | static struct ev_idle **idles; |
497 | static struct ev_idle **idles; |
… | |
… | |
639 | |
640 | |
640 | #ifndef WIN32 |
641 | #ifndef WIN32 |
641 | ev_signal_init (&childev, childcb, SIGCHLD); |
642 | ev_signal_init (&childev, childcb, SIGCHLD); |
642 | ev_set_priority (&childev, EV_MAXPRI); |
643 | ev_set_priority (&childev, EV_MAXPRI); |
643 | ev_signal_start (EV_A_ &childev); |
644 | ev_signal_start (EV_A_ &childev); |
|
|
645 | ev_unref (EV_A); /* child watcher should not keep loop alive */ |
644 | #endif |
646 | #endif |
645 | } |
647 | } |
646 | } |
648 | } |
647 | |
649 | |
648 | return method; |
650 | return method; |
… | |
… | |
911 | /* queue check watchers, to be executed first */ |
913 | /* queue check watchers, to be executed first */ |
912 | if (checkcnt) |
914 | if (checkcnt) |
913 | queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); |
915 | queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); |
914 | |
916 | |
915 | call_pending (EV_A); |
917 | call_pending (EV_A); |
916 | printf ("activecnt %d\n", activecnt);//D |
|
|
917 | } |
918 | } |
918 | while (activecnt && !loop_done); |
919 | while (activecnt && !loop_done); |
919 | |
920 | |
920 | if (loop_done != 2) |
921 | if (loop_done != 2) |
921 | loop_done = 0; |
922 | loop_done = 0; |