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

Comparing libev/ev.c (file contents):
Revision 1.200 by root, Wed Dec 26 08:06:09 2007 UTC vs.
Revision 1.206 by root, Fri Jan 25 15:45:08 2008 UTC

867 867
868#ifndef _WIN32 868#ifndef _WIN32
869 869
870static ev_signal childev; 870static ev_signal childev;
871 871
872#ifndef WIFCONTINUED
873# define WIFCONTINUED(status) 0
874#endif
875
872void inline_speed 876void inline_speed
873child_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)
874{ 878{
875 ev_child *w; 879 ev_child *w;
880 int traced = WIFSTOPPED (status) || WIFCONTINUED (status);
876 881
877 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 {
878 if (w->pid == pid || !w->pid) 884 if ((w->pid == pid || !w->pid)
885 && (!traced || (w->flags & 1)))
879 { 886 {
880 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* */
881 w->rpid = pid; 888 w->rpid = pid;
882 w->rstatus = status; 889 w->rstatus = status;
883 ev_feed_event (EV_A_ (W)w, EV_CHILD); 890 ev_feed_event (EV_A_ (W)w, EV_CHILD);
884 } 891 }
892 }
885} 893}
886 894
887#ifndef WCONTINUED 895#ifndef WCONTINUED
888# define WCONTINUED 0 896# define WCONTINUED 0
889#endif 897#endif
1166 1174
1167 while (pipe (sigpipe)) 1175 while (pipe (sigpipe))
1168 syserr ("(libev) error creating pipe"); 1176 syserr ("(libev) error creating pipe");
1169 1177
1170 siginit (EV_A); 1178 siginit (EV_A);
1179 sigcb (EV_A_ &sigev, EV_READ);
1171 } 1180 }
1172 1181
1173 postfork = 0; 1182 postfork = 0;
1174} 1183}
1175 1184
1197} 1206}
1198 1207
1199void 1208void
1200ev_loop_fork (EV_P) 1209ev_loop_fork (EV_P)
1201{ 1210{
1202 postfork = 1; 1211 postfork = 1; /* must be in line with ev_default_fork */
1203} 1212}
1204 1213
1205#endif 1214#endif
1206 1215
1207#if EV_MULTIPLICITY 1216#if EV_MULTIPLICITY
1271#if EV_MULTIPLICITY 1280#if EV_MULTIPLICITY
1272 struct ev_loop *loop = ev_default_loop_ptr; 1281 struct ev_loop *loop = ev_default_loop_ptr;
1273#endif 1282#endif
1274 1283
1275 if (backend) 1284 if (backend)
1276 postfork = 1; 1285 postfork = 1; /* must be in line with ev_loop_fork */
1277} 1286}
1278 1287
1279/*****************************************************************************/ 1288/*****************************************************************************/
1280 1289
1281void 1290void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines