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

Comparing libev/ev.c (file contents):
Revision 1.130 by root, Fri Nov 23 05:13:48 2007 UTC vs.
Revision 1.133 by root, Fri Nov 23 11:32:22 2007 UTC

32#ifdef __cplusplus 32#ifdef __cplusplus
33extern "C" { 33extern "C" {
34#endif 34#endif
35 35
36#ifndef EV_STANDALONE 36#ifndef EV_STANDALONE
37# ifdef EV_CONFIG_H
38# include EV_CONFIG_H
39# else
37# include "config.h" 40# include "config.h"
41# endif
38 42
39# if HAVE_CLOCK_GETTIME 43# if HAVE_CLOCK_GETTIME
40# ifndef EV_USE_MONOTONIC 44# ifndef EV_USE_MONOTONIC
41# define EV_USE_MONOTONIC 1 45# define EV_USE_MONOTONIC 1
42# endif 46# endif
727 int pid, status; 731 int pid, status;
728 732
729 if (0 < (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED))) 733 if (0 < (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED)))
730 { 734 {
731 /* make sure we are called again until all childs have been reaped */ 735 /* make sure we are called again until all childs have been reaped */
736 /* we need to do it this way so that the callback gets called before we continue */
732 ev_feed_event (EV_A_ (W)sw, EV_SIGNAL); 737 ev_feed_event (EV_A_ (W)sw, EV_SIGNAL);
733 738
734 child_reap (EV_A_ sw, pid, pid, status); 739 child_reap (EV_A_ sw, pid, pid, status);
735 child_reap (EV_A_ sw, 0, pid, status); /* this might trigger a watcher twice, but event catches that */ 740 child_reap (EV_A_ sw, 0, pid, status); /* this might trigger a watcher twice, but feed_event catches that */
736 } 741 }
737} 742}
738 743
739#endif 744#endif
740 745
795} 800}
796 801
797unsigned int 802unsigned int
798ev_recommended_backends (void) 803ev_recommended_backends (void)
799{ 804{
800 unsigned int flags = ev_recommended_backends (); 805 unsigned int flags = ev_supported_backends ();
801 806
802#ifndef __NetBSD__ 807#ifndef __NetBSD__
803 /* kqueue is borked on everything but netbsd apparently */ 808 /* kqueue is borked on everything but netbsd apparently */
804 /* it usually doesn't work correctly on anything but sockets and pipes */ 809 /* it usually doesn't work correctly on anything but sockets and pipes */
805 flags &= ~EVBACKEND_KQUEUE; 810 flags &= ~EVBACKEND_KQUEUE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines