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

Comparing libev/ev.c (file contents):
Revision 1.217 by root, Sat Mar 22 13:42:45 2008 UTC vs.
Revision 1.218 by root, Sun Mar 23 00:05:03 2008 UTC

865} 865}
866 866
867/*****************************************************************************/ 867/*****************************************************************************/
868 868
869static void 869static void
870sighandler (int signum) 870ev_sighandler (int signum)
871{ 871{
872#if EV_MULTIPLICITY 872#if EV_MULTIPLICITY
873 struct ev_loop *loop = &default_loop_struct; 873 struct ev_loop *loop = &default_loop_struct;
874#endif 874#endif
875 875
876#if _WIN32 876#if _WIN32
877 signal (signum, sighandler); 877 signal (signum, ev_sighandler);
878#endif 878#endif
879 879
880 signals [signum - 1].gotsig = 1; 880 signals [signum - 1].gotsig = 1;
881 evpipe_write (EV_A_ &gotsig); 881 evpipe_write (EV_A_ &gotsig);
882} 882}
1930 wlist_add (&signals [w->signum - 1].head, (WL)w); 1930 wlist_add (&signals [w->signum - 1].head, (WL)w);
1931 1931
1932 if (!((WL)w)->next) 1932 if (!((WL)w)->next)
1933 { 1933 {
1934#if _WIN32 1934#if _WIN32
1935 signal (w->signum, sighandler); 1935 signal (w->signum, ev_sighandler);
1936#else 1936#else
1937 struct sigaction sa; 1937 struct sigaction sa;
1938 sa.sa_handler = sighandler; 1938 sa.sa_handler = ev_sighandler;
1939 sigfillset (&sa.sa_mask); 1939 sigfillset (&sa.sa_mask);
1940 sa.sa_flags = SA_RESTART; /* if restarting works we save one iteration */ 1940 sa.sa_flags = SA_RESTART; /* if restarting works we save one iteration */
1941 sigaction (w->signum, &sa, 0); 1941 sigaction (w->signum, &sa, 0);
1942#endif 1942#endif
1943 } 1943 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines