ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.211 by root, Tue Feb 19 17:09:28 2008 UTC vs.
Revision 1.212 by root, Tue Feb 19 19:01:13 2008 UTC

811 fd_intern (evpipe [1]); 811 fd_intern (evpipe [1]);
812 812
813 ev_io_set (&pipeev, evpipe [0], EV_READ); 813 ev_io_set (&pipeev, evpipe [0], EV_READ);
814 ev_io_start (EV_A_ &pipeev); 814 ev_io_start (EV_A_ &pipeev);
815 ev_unref (EV_A); /* watcher should not keep loop alive */ 815 ev_unref (EV_A); /* watcher should not keep loop alive */
816
817 /* in case we received the signal before we had the chance of installing a handler */
818 ev_feed_event (EV_A_ &pipeev, 0);
819 } 816 }
820} 817}
821 818
822void inline_size 819void inline_size
823evpipe_write (EV_P_ int sig, int async) 820evpipe_write (EV_P_ int sig, int async)
1221#endif 1218#endif
1222 1219
1223 if (ev_is_active (&pipeev)) 1220 if (ev_is_active (&pipeev))
1224 { 1221 {
1225 /* this "locks" the handlers against writing to the pipe */ 1222 /* this "locks" the handlers against writing to the pipe */
1223 /* while we modify the fd vars */
1224 gotsig = 1;
1225#if EV_ASYNC_ENABLE
1226 gotsig = gotasync = 1; 1226 gotasync = 1;
1227#endif
1227 1228
1228 ev_ref (EV_A); 1229 ev_ref (EV_A);
1229 ev_io_stop (EV_A_ &pipeev); 1230 ev_io_stop (EV_A_ &pipeev);
1230 close (evpipe [0]); 1231 close (evpipe [0]);
1231 close (evpipe [1]); 1232 close (evpipe [1]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines