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

Comparing libev/ev.c (file contents):
Revision 1.157 by root, Wed Nov 28 20:58:32 2007 UTC vs.
Revision 1.158 by root, Thu Nov 29 17:28:13 2007 UTC

904 ev_rt_now = ev_time (); 904 ev_rt_now = ev_time ();
905 mn_now = get_clock (); 905 mn_now = get_clock ();
906 now_floor = mn_now; 906 now_floor = mn_now;
907 rtmn_diff = ev_rt_now - mn_now; 907 rtmn_diff = ev_rt_now - mn_now;
908 908
909 /* pid check not overridable via env */
910#ifndef _WIN32
911 if (flags & EVFLAG_FORKCHECK)
912 curpid = getpid ();
913#endif
914
909 if (!(flags & EVFLAG_NOENV) 915 if (!(flags & EVFLAG_NOENV)
910 && !enable_secure () 916 && !enable_secure ()
911 && getenv ("LIBEV_FLAGS")) 917 && getenv ("LIBEV_FLAGS"))
912 flags = atoi (getenv ("LIBEV_FLAGS")); 918 flags = atoi (getenv ("LIBEV_FLAGS"));
913 919
1334{ 1340{
1335 loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK) 1341 loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK)
1336 ? EVUNLOOP_ONE 1342 ? EVUNLOOP_ONE
1337 : EVUNLOOP_CANCEL; 1343 : EVUNLOOP_CANCEL;
1338 1344
1345 call_pending (EV_A); /* in case we recurse, ensure ordering stays nice and clean */
1346
1339 while (activecnt) 1347 while (activecnt)
1340 { 1348 {
1349#ifndef _WIN32
1350 if (expect_false (curpid)) /* penalise the forking check even more */
1351 if (expect_false (getpid () != curpid))
1352 {
1353 curpid = getpid ();
1354 postfork = 1;
1355 }
1356#endif
1357
1341#if EV_FORK_ENABLE 1358#if EV_FORK_ENABLE
1342 /* we might have forked, so queue fork handlers */ 1359 /* we might have forked, so queue fork handlers */
1343 if (expect_false (postfork)) 1360 if (expect_false (postfork))
1344 if (forkcnt) 1361 if (forkcnt)
1345 { 1362 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines