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

Comparing libev/ev.c (file contents):
Revision 1.199 by root, Tue Dec 25 07:05:45 2007 UTC vs.
Revision 1.206 by root, Fri Jan 25 15:45:08 2008 UTC

600 600
601#if EV_SELECT_IS_WINSOCKET 601#if EV_SELECT_IS_WINSOCKET
602 if (events) 602 if (events)
603 { 603 {
604 unsigned long argp; 604 unsigned long argp;
605 #ifdef EV_FD_TO_WIN32_HANDLE
606 anfd->handle = EV_FD_TO_WIN32_HANDLE (fd);
607 #else
605 anfd->handle = _get_osfhandle (fd); 608 anfd->handle = _get_osfhandle (fd);
609 #endif
606 assert (("libev only supports socket fds in this configuration", ioctlsocket (anfd->handle, FIONREAD, &argp) == 0)); 610 assert (("libev only supports socket fds in this configuration", ioctlsocket (anfd->handle, FIONREAD, &argp) == 0));
607 } 611 }
608#endif 612#endif
609 613
610 { 614 {
863 867
864#ifndef _WIN32 868#ifndef _WIN32
865 869
866static ev_signal childev; 870static ev_signal childev;
867 871
872#ifndef WIFCONTINUED
873# define WIFCONTINUED(status) 0
874#endif
875
868void inline_speed 876void inline_speed
869child_reap (EV_P_ ev_signal *sw, int chain, int pid, int status) 877child_reap (EV_P_ ev_signal *sw, int chain, int pid, int status)
870{ 878{
871 ev_child *w; 879 ev_child *w;
880 int traced = WIFSTOPPED (status) || WIFCONTINUED (status);
872 881
873 for (w = (ev_child *)childs [chain & (EV_PID_HASHSIZE - 1)]; w; w = (ev_child *)((WL)w)->next) 882 for (w = (ev_child *)childs [chain & (EV_PID_HASHSIZE - 1)]; w; w = (ev_child *)((WL)w)->next)
883 {
874 if (w->pid == pid || !w->pid) 884 if ((w->pid == pid || !w->pid)
885 && (!traced || (w->flags & 1)))
875 { 886 {
876 ev_set_priority (w, ev_priority (sw)); /* need to do it *now* */ 887 ev_set_priority (w, ev_priority (sw)); /* need to do it *now* */
877 w->rpid = pid; 888 w->rpid = pid;
878 w->rstatus = status; 889 w->rstatus = status;
879 ev_feed_event (EV_A_ (W)w, EV_CHILD); 890 ev_feed_event (EV_A_ (W)w, EV_CHILD);
880 } 891 }
892 }
881} 893}
882 894
883#ifndef WCONTINUED 895#ifndef WCONTINUED
884# define WCONTINUED 0 896# define WCONTINUED 0
885#endif 897#endif
1162 1174
1163 while (pipe (sigpipe)) 1175 while (pipe (sigpipe))
1164 syserr ("(libev) error creating pipe"); 1176 syserr ("(libev) error creating pipe");
1165 1177
1166 siginit (EV_A); 1178 siginit (EV_A);
1179 sigcb (EV_A_ &sigev, EV_READ);
1167 } 1180 }
1168 1181
1169 postfork = 0; 1182 postfork = 0;
1170} 1183}
1171 1184
1193} 1206}
1194 1207
1195void 1208void
1196ev_loop_fork (EV_P) 1209ev_loop_fork (EV_P)
1197{ 1210{
1198 postfork = 1; 1211 postfork = 1; /* must be in line with ev_default_fork */
1199} 1212}
1200 1213
1201#endif 1214#endif
1202 1215
1203#if EV_MULTIPLICITY 1216#if EV_MULTIPLICITY
1267#if EV_MULTIPLICITY 1280#if EV_MULTIPLICITY
1268 struct ev_loop *loop = ev_default_loop_ptr; 1281 struct ev_loop *loop = ev_default_loop_ptr;
1269#endif 1282#endif
1270 1283
1271 if (backend) 1284 if (backend)
1272 postfork = 1; 1285 postfork = 1; /* must be in line with ev_loop_fork */
1273} 1286}
1274 1287
1275/*****************************************************************************/ 1288/*****************************************************************************/
1276 1289
1277void 1290void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines