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

Comparing libev/ev.c (file contents):
Revision 1.36 by root, Thu Nov 1 13:11:11 2007 UTC vs.
Revision 1.49 by root, Sat Nov 3 16:16:58 2007 UTC

42#include <stdio.h> 42#include <stdio.h>
43 43
44#include <assert.h> 44#include <assert.h>
45#include <errno.h> 45#include <errno.h>
46#include <sys/types.h> 46#include <sys/types.h>
47#ifndef WIN32
47#include <sys/wait.h> 48# include <sys/wait.h>
49#endif
48#include <sys/time.h> 50#include <sys/time.h>
49#include <time.h> 51#include <time.h>
50 52
53/**/
54
51#ifndef EV_USE_MONOTONIC 55#ifndef EV_USE_MONOTONIC
52# ifdef CLOCK_MONOTONIC
53# define EV_USE_MONOTONIC 1 56# define EV_USE_MONOTONIC 1
54# endif
55#endif 57#endif
56 58
57#ifndef EV_USE_SELECT 59#ifndef EV_USE_SELECT
58# define EV_USE_SELECT 1 60# define EV_USE_SELECT 1
59#endif 61#endif
60 62
63#ifndef EV_USE_POLL
64# define EV_USE_POLL 0 /* poll is usually slower than select, and not as well tested */
65#endif
66
61#ifndef EV_USE_EPOLL 67#ifndef EV_USE_EPOLL
62# define EV_USE_EPOLL 0 68# define EV_USE_EPOLL 0
63#endif 69#endif
64 70
71#ifndef EV_USE_KQUEUE
72# define EV_USE_KQUEUE 0
73#endif
74
75#ifndef EV_USE_REALTIME
76# define EV_USE_REALTIME 1
77#endif
78
79/**/
80
81#ifndef CLOCK_MONOTONIC
82# undef EV_USE_MONOTONIC
83# define EV_USE_MONOTONIC 0
84#endif
85
65#ifndef CLOCK_REALTIME 86#ifndef CLOCK_REALTIME
87# undef EV_USE_REALTIME
66# define EV_USE_REALTIME 0 88# define EV_USE_REALTIME 0
67#endif 89#endif
68#ifndef EV_USE_REALTIME 90
69# define EV_USE_REALTIME 1 /* posix requirement, but might be slower */ 91/**/
70#endif
71 92
72#define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */ 93#define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */
73#define MAX_BLOCKTIME 59.731 /* never wait longer than this time (to detetc time jumps) */ 94#define MAX_BLOCKTIME 59.731 /* never wait longer than this time (to detect time jumps) */
74#define PID_HASHSIZE 16 /* size of pid hash table, must be power of two */ 95#define PID_HASHSIZE 16 /* size of pid hash table, must be power of two */
75#define CLEANUP_INTERVAL (MAX_BLOCKTIME * 5.) /* how often to try to free memory and re-check fds */ 96/*#define CLEANUP_INTERVAL 300. /* how often to try to free memory and re-check fds */
76 97
77#include "ev.h" 98#include "ev.h"
99
100#if __GNUC__ >= 3
101# define expect(expr,value) __builtin_expect ((expr),(value))
102# define inline inline
103#else
104# define expect(expr,value) (expr)
105# define inline static
106#endif
107
108#define expect_false(expr) expect ((expr) != 0, 0)
109#define expect_true(expr) expect ((expr) != 0, 1)
110
111#define NUMPRI (EV_MAXPRI - EV_MINPRI + 1)
112#define ABSPRI(w) ((w)->priority - EV_MINPRI)
78 113
79typedef struct ev_watcher *W; 114typedef struct ev_watcher *W;
80typedef struct ev_watcher_list *WL; 115typedef struct ev_watcher_list *WL;
81typedef struct ev_watcher_time *WT; 116typedef struct ev_watcher_time *WT;
82 117
83static ev_tstamp now, diff; /* monotonic clock */ 118static ev_tstamp now_floor, now, diff; /* monotonic clock */
84ev_tstamp ev_now; 119ev_tstamp ev_now;
85int ev_method; 120int ev_method;
86 121
87static int have_monotonic; /* runtime */ 122static int have_monotonic; /* runtime */
88 123
108 143
109static ev_tstamp 144static ev_tstamp
110get_clock (void) 145get_clock (void)
111{ 146{
112#if EV_USE_MONOTONIC 147#if EV_USE_MONOTONIC
113 if (have_monotonic) 148 if (expect_true (have_monotonic))
114 { 149 {
115 struct timespec ts; 150 struct timespec ts;
116 clock_gettime (CLOCK_MONOTONIC, &ts); 151 clock_gettime (CLOCK_MONOTONIC, &ts);
117 return ts.tv_sec + ts.tv_nsec * 1e-9; 152 return ts.tv_sec + ts.tv_nsec * 1e-9;
118 } 153 }
122} 157}
123 158
124#define array_roundsize(base,n) ((n) | 4 & ~3) 159#define array_roundsize(base,n) ((n) | 4 & ~3)
125 160
126#define array_needsize(base,cur,cnt,init) \ 161#define array_needsize(base,cur,cnt,init) \
127 if ((cnt) > cur) \ 162 if (expect_false ((cnt) > cur)) \
128 { \ 163 { \
129 int newcnt = cur; \ 164 int newcnt = cur; \
130 do \ 165 do \
131 { \ 166 { \
132 newcnt = array_roundsize (base, newcnt << 1); \ 167 newcnt = array_roundsize (base, newcnt << 1); \
167{ 202{
168 W w; 203 W w;
169 int events; 204 int events;
170} ANPENDING; 205} ANPENDING;
171 206
172static ANPENDING *pendings; 207static ANPENDING *pendings [NUMPRI];
173static int pendingmax, pendingcnt; 208static int pendingmax [NUMPRI], pendingcnt [NUMPRI];
174 209
175static void 210static void
176event (W w, int events) 211event (W w, int events)
177{ 212{
178 if (w->pending) 213 if (w->pending)
179 { 214 {
180 pendings [w->pending - 1].events |= events; 215 pendings [ABSPRI (w)][w->pending - 1].events |= events;
181 return; 216 return;
182 } 217 }
183 218
184 w->pending = ++pendingcnt; 219 w->pending = ++pendingcnt [ABSPRI (w)];
185 array_needsize (pendings, pendingmax, pendingcnt, ); 220 array_needsize (pendings [ABSPRI (w)], pendingmax [ABSPRI (w)], pendingcnt [ABSPRI (w)], );
186 pendings [pendingcnt - 1].w = w; 221 pendings [ABSPRI (w)][w->pending - 1].w = w;
187 pendings [pendingcnt - 1].events = events; 222 pendings [ABSPRI (w)][w->pending - 1].events = events;
188} 223}
189 224
190static void 225static void
191queue_events (W *events, int eventcnt, int type) 226queue_events (W *events, int eventcnt, int type)
192{ 227{
255 ++fdchangecnt; 290 ++fdchangecnt;
256 array_needsize (fdchanges, fdchangemax, fdchangecnt, ); 291 array_needsize (fdchanges, fdchangemax, fdchangecnt, );
257 fdchanges [fdchangecnt - 1] = fd; 292 fdchanges [fdchangecnt - 1] = fd;
258} 293}
259 294
295static void
296fd_kill (int fd)
297{
298 struct ev_io *w;
299
300 printf ("killing fd %d\n", fd);//D
301 while ((w = anfds [fd].head))
302 {
303 ev_io_stop (w);
304 event ((W)w, EV_ERROR | EV_READ | EV_WRITE);
305 }
306}
307
260/* called on EBADF to verify fds */ 308/* called on EBADF to verify fds */
261static void 309static void
262fd_recheck (void) 310fd_ebadf (void)
263{ 311{
264 int fd; 312 int fd;
265 313
266 for (fd = 0; fd < anfdmax; ++fd) 314 for (fd = 0; fd < anfdmax; ++fd)
267 if (anfds [fd].events) 315 if (anfds [fd].events)
268 if (fcntl (fd, F_GETFD) == -1 && errno == EBADF) 316 if (fcntl (fd, F_GETFD) == -1 && errno == EBADF)
269 while (anfds [fd].head) 317 fd_kill (fd);
318}
319
320/* called on ENOMEM in select/poll to kill some fds and retry */
321static void
322fd_enomem (void)
323{
324 int fd = anfdmax;
325
326 while (fd--)
327 if (anfds [fd].events)
270 { 328 {
271 ev_io_stop (anfds [fd].head); 329 close (fd);
272 event ((W)anfds [fd].head, EV_ERROR | EV_READ | EV_WRITE); 330 fd_kill (fd);
331 return;
273 } 332 }
274} 333}
275 334
276/*****************************************************************************/ 335/*****************************************************************************/
277 336
278static struct ev_timer **timers; 337static struct ev_timer **timers;
354{ 413{
355 signals [signum - 1].gotsig = 1; 414 signals [signum - 1].gotsig = 1;
356 415
357 if (!gotsig) 416 if (!gotsig)
358 { 417 {
418 int old_errno = errno;
359 gotsig = 1; 419 gotsig = 1;
360 write (sigpipe [1], &signum, 1); 420 write (sigpipe [1], &signum, 1);
421 errno = old_errno;
361 } 422 }
362} 423}
363 424
364static void 425static void
365sigcb (struct ev_io *iow, int revents) 426sigcb (struct ev_io *iow, int revents)
366{ 427{
367 struct ev_signal *w; 428 struct ev_signal *w;
368 int sig; 429 int signum;
369 430
370 read (sigpipe [0], &revents, 1); 431 read (sigpipe [0], &revents, 1);
371 gotsig = 0; 432 gotsig = 0;
372 433
373 for (sig = signalmax; sig--; ) 434 for (signum = signalmax; signum--; )
374 if (signals [sig].gotsig) 435 if (signals [signum].gotsig)
375 { 436 {
376 signals [sig].gotsig = 0; 437 signals [signum].gotsig = 0;
377 438
378 for (w = signals [sig].head; w; w = w->next) 439 for (w = signals [signum].head; w; w = w->next)
379 event ((W)w, EV_SIGNAL); 440 event ((W)w, EV_SIGNAL);
380 } 441 }
381} 442}
382 443
383static void 444static void
384siginit (void) 445siginit (void)
385{ 446{
447#ifndef WIN32
386 fcntl (sigpipe [0], F_SETFD, FD_CLOEXEC); 448 fcntl (sigpipe [0], F_SETFD, FD_CLOEXEC);
387 fcntl (sigpipe [1], F_SETFD, FD_CLOEXEC); 449 fcntl (sigpipe [1], F_SETFD, FD_CLOEXEC);
388 450
389 /* rather than sort out wether we really need nb, set it */ 451 /* rather than sort out wether we really need nb, set it */
390 fcntl (sigpipe [0], F_SETFL, O_NONBLOCK); 452 fcntl (sigpipe [0], F_SETFL, O_NONBLOCK);
391 fcntl (sigpipe [1], F_SETFL, O_NONBLOCK); 453 fcntl (sigpipe [1], F_SETFL, O_NONBLOCK);
454#endif
392 455
393 ev_io_set (&sigev, sigpipe [0], EV_READ); 456 ev_io_set (&sigev, sigpipe [0], EV_READ);
394 ev_io_start (&sigev); 457 ev_io_start (&sigev);
395} 458}
396 459
408/*****************************************************************************/ 471/*****************************************************************************/
409 472
410static struct ev_child *childs [PID_HASHSIZE]; 473static struct ev_child *childs [PID_HASHSIZE];
411static struct ev_signal childev; 474static struct ev_signal childev;
412 475
476#ifndef WIN32
477
413#ifndef WCONTINUED 478#ifndef WCONTINUED
414# define WCONTINUED 0 479# define WCONTINUED 0
415#endif 480#endif
416 481
417static void 482static void
483child_reap (struct ev_signal *sw, int chain, int pid, int status)
484{
485 struct ev_child *w;
486
487 for (w = childs [chain & (PID_HASHSIZE - 1)]; w; w = w->next)
488 if (w->pid == pid || !w->pid)
489 {
490 w->priority = sw->priority; /* need to do it *now* */
491 w->rpid = pid;
492 w->rstatus = status;
493 printf ("rpid %p %d %d\n", w, pid, w->pid);//D
494 event ((W)w, EV_CHILD);
495 }
496}
497
498static void
418childcb (struct ev_signal *sw, int revents) 499childcb (struct ev_signal *sw, int revents)
419{ 500{
420 struct ev_child *w;
421 int pid, status; 501 int pid, status;
422 502
503 printf ("chld %x\n", revents);//D
423 while ((pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED)) != -1) 504 if (0 < (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED)))
424 for (w = childs [pid & (PID_HASHSIZE - 1)]; w; w = w->next) 505 {
425 if (w->pid == pid || w->pid == -1) 506 /* make sure we are called again until all childs have been reaped */
426 {
427 w->status = status;
428 event ((W)w, EV_CHILD); 507 event ((W)sw, EV_SIGNAL);
429 } 508
509 child_reap (sw, pid, pid, status);
510 child_reap (sw, 0, pid, status); /* this might trigger a watcher twice, but event catches that */
511 }
430} 512}
513
514#endif
431 515
432/*****************************************************************************/ 516/*****************************************************************************/
433 517
518#if EV_USE_KQUEUE
519# include "ev_kqueue.c"
520#endif
434#if EV_USE_EPOLL 521#if EV_USE_EPOLL
435# include "ev_epoll.c" 522# include "ev_epoll.c"
436#endif 523#endif
524#if EV_USE_POLL
525# include "ev_poll.c"
526#endif
437#if EV_USE_SELECT 527#if EV_USE_SELECT
438# include "ev_select.c" 528# include "ev_select.c"
439#endif 529#endif
440 530
441int 531int
448ev_version_minor (void) 538ev_version_minor (void)
449{ 539{
450 return EV_VERSION_MINOR; 540 return EV_VERSION_MINOR;
451} 541}
452 542
543/* return true if we are running with elevated privileges and should ignore env variables */
544static int
545enable_secure ()
546{
547#ifdef WIN32
548 return 0;
549#else
550 return getuid () != geteuid ()
551 || getgid () != getegid ();
552#endif
553}
554
453int ev_init (int flags) 555int ev_init (int methods)
454{ 556{
455 if (!ev_method) 557 if (!ev_method)
456 { 558 {
457#if EV_USE_MONOTONIC 559#if EV_USE_MONOTONIC
458 { 560 {
460 if (!clock_gettime (CLOCK_MONOTONIC, &ts)) 562 if (!clock_gettime (CLOCK_MONOTONIC, &ts))
461 have_monotonic = 1; 563 have_monotonic = 1;
462 } 564 }
463#endif 565#endif
464 566
465 ev_now = ev_time (); 567 ev_now = ev_time ();
466 now = get_clock (); 568 now = get_clock ();
569 now_floor = now;
467 diff = ev_now - now; 570 diff = ev_now - now;
468 571
469 if (pipe (sigpipe)) 572 if (pipe (sigpipe))
470 return 0; 573 return 0;
471 574
575 if (methods == EVMETHOD_AUTO)
576 if (!enable_secure () && getenv ("LIBEV_METHODS"))
577 methods = atoi (getenv ("LIBEV_METHODS"));
578 else
472 ev_method = EVMETHOD_NONE; 579 methods = EVMETHOD_ANY;
580
581 ev_method = 0;
582#if EV_USE_KQUEUE
583 if (!ev_method && (methods & EVMETHOD_KQUEUE)) kqueue_init (methods);
584#endif
473#if EV_USE_EPOLL 585#if EV_USE_EPOLL
474 if (ev_method == EVMETHOD_NONE) epoll_init (flags); 586 if (!ev_method && (methods & EVMETHOD_EPOLL )) epoll_init (methods);
587#endif
588#if EV_USE_POLL
589 if (!ev_method && (methods & EVMETHOD_POLL )) poll_init (methods);
475#endif 590#endif
476#if EV_USE_SELECT 591#if EV_USE_SELECT
477 if (ev_method == EVMETHOD_NONE) select_init (flags); 592 if (!ev_method && (methods & EVMETHOD_SELECT)) select_init (methods);
478#endif 593#endif
479 594
480 if (ev_method) 595 if (ev_method)
481 { 596 {
482 ev_watcher_init (&sigev, sigcb); 597 ev_watcher_init (&sigev, sigcb);
598 ev_set_priority (&sigev, EV_MAXPRI);
483 siginit (); 599 siginit ();
484 600
601#ifndef WIN32
485 ev_signal_init (&childev, childcb, SIGCHLD); 602 ev_signal_init (&childev, childcb, SIGCHLD);
603 ev_set_priority (&childev, EV_MAXPRI);
486 ev_signal_start (&childev); 604 ev_signal_start (&childev);
605#endif
487 } 606 }
488 } 607 }
489 608
490 return ev_method; 609 return ev_method;
491} 610}
522/*****************************************************************************/ 641/*****************************************************************************/
523 642
524static void 643static void
525call_pending (void) 644call_pending (void)
526{ 645{
646 int pri;
647
648 for (pri = NUMPRI; pri--; )
527 while (pendingcnt) 649 while (pendingcnt [pri])
528 { 650 {
529 ANPENDING *p = pendings + --pendingcnt; 651 ANPENDING *p = pendings [pri] + --pendingcnt [pri];
530 652
531 if (p->w) 653 if (p->w)
532 { 654 {
533 p->w->pending = 0; 655 p->w->pending = 0;
534 p->w->cb (p->w, p->events); 656 p->w->cb (p->w, p->events);
535 } 657 }
536 } 658 }
537} 659}
538 660
539static void 661static void
540timers_reify (void) 662timers_reify (void)
541{ 663{
601 } 723 }
602 } 724 }
603 } 725 }
604} 726}
605 727
728static int
729time_update_monotonic (void)
730{
731 now = get_clock ();
732
733 if (expect_true (now - now_floor < MIN_TIMEJUMP * .5))
734 {
735 ev_now = now + diff;
736 return 0;
737 }
738 else
739 {
740 now_floor = now;
741 ev_now = ev_time ();
742 return 1;
743 }
744}
745
606static void 746static void
607time_update (void) 747time_update (void)
608{ 748{
609 int i; 749 int i;
610 750
611 ev_now = ev_time (); 751#if EV_USE_MONOTONIC
612
613 if (have_monotonic) 752 if (expect_true (have_monotonic))
614 { 753 {
615 ev_tstamp odiff = diff; 754 if (time_update_monotonic ())
616
617 for (i = 4; --i; ) /* loop a few times, before making important decisions */
618 { 755 {
619 now = get_clock (); 756 ev_tstamp odiff = diff;
757
758 for (i = 4; --i; ) /* loop a few times, before making important decisions */
759 {
620 diff = ev_now - now; 760 diff = ev_now - now;
621 761
622 if (fabs (odiff - diff) < MIN_TIMEJUMP) 762 if (fabs (odiff - diff) < MIN_TIMEJUMP)
623 return; /* all is well */ 763 return; /* all is well */
624 764
625 ev_now = ev_time (); 765 ev_now = ev_time ();
766 now = get_clock ();
767 now_floor = now;
768 }
769
770 periodics_reschedule (diff - odiff);
771 /* no timer adjustment, as the monotonic clock doesn't jump */
626 } 772 }
627
628 periodics_reschedule (diff - odiff);
629 /* no timer adjustment, as the monotonic clock doesn't jump */
630 } 773 }
631 else 774 else
775#endif
632 { 776 {
777 ev_now = ev_time ();
778
633 if (now > ev_now || now < ev_now - MAX_BLOCKTIME - MIN_TIMEJUMP) 779 if (expect_false (now > ev_now || now < ev_now - MAX_BLOCKTIME - MIN_TIMEJUMP))
634 { 780 {
635 periodics_reschedule (ev_now - now); 781 periodics_reschedule (ev_now - now);
636 782
637 /* adjust timers. this is easy, as the offset is the same for all */ 783 /* adjust timers. this is easy, as the offset is the same for all */
638 for (i = 0; i < timercnt; ++i) 784 for (i = 0; i < timercnt; ++i)
651 ev_loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK) ? 1 : 0; 797 ev_loop_done = flags & (EVLOOP_ONESHOT | EVLOOP_NONBLOCK) ? 1 : 0;
652 798
653 do 799 do
654 { 800 {
655 /* queue check watchers (and execute them) */ 801 /* queue check watchers (and execute them) */
656 if (preparecnt) 802 if (expect_false (preparecnt))
657 { 803 {
658 queue_events ((W *)prepares, preparecnt, EV_PREPARE); 804 queue_events ((W *)prepares, preparecnt, EV_PREPARE);
659 call_pending (); 805 call_pending ();
660 } 806 }
661 807
664 810
665 /* calculate blocking time */ 811 /* calculate blocking time */
666 812
667 /* we only need this for !monotonic clockor timers, but as we basically 813 /* we only need this for !monotonic clockor timers, but as we basically
668 always have timers, we just calculate it always */ 814 always have timers, we just calculate it always */
815#if EV_USE_MONOTONIC
816 if (expect_true (have_monotonic))
817 time_update_monotonic ();
818 else
819#endif
820 {
669 ev_now = ev_time (); 821 ev_now = ev_time ();
822 now = ev_now;
823 }
670 824
671 if (flags & EVLOOP_NONBLOCK || idlecnt) 825 if (flags & EVLOOP_NONBLOCK || idlecnt)
672 block = 0.; 826 block = 0.;
673 else 827 else
674 { 828 {
675 block = MAX_BLOCKTIME; 829 block = MAX_BLOCKTIME;
676 830
677 if (timercnt) 831 if (timercnt)
678 { 832 {
679 ev_tstamp to = timers [0]->at - (have_monotonic ? get_clock () : ev_now) + method_fudge; 833 ev_tstamp to = timers [0]->at - now + method_fudge;
680 if (block > to) block = to; 834 if (block > to) block = to;
681 } 835 }
682 836
683 if (periodiccnt) 837 if (periodiccnt)
684 { 838 {
741static void 895static void
742ev_clear_pending (W w) 896ev_clear_pending (W w)
743{ 897{
744 if (w->pending) 898 if (w->pending)
745 { 899 {
746 pendings [w->pending - 1].w = 0; 900 pendings [ABSPRI (w)][w->pending - 1].w = 0;
747 w->pending = 0; 901 w->pending = 0;
748 } 902 }
749} 903}
750 904
751static void 905static void
752ev_start (W w, int active) 906ev_start (W w, int active)
753{ 907{
908 if (w->priority < EV_MINPRI) w->priority = EV_MINPRI;
909 if (w->priority > EV_MAXPRI) w->priority = EV_MAXPRI;
910
754 w->active = active; 911 w->active = active;
755} 912}
756 913
757static void 914static void
758ev_stop (W w) 915ev_stop (W w)
763/*****************************************************************************/ 920/*****************************************************************************/
764 921
765void 922void
766ev_io_start (struct ev_io *w) 923ev_io_start (struct ev_io *w)
767{ 924{
925 int fd = w->fd;
926
768 if (ev_is_active (w)) 927 if (ev_is_active (w))
769 return; 928 return;
770
771 int fd = w->fd;
772 929
773 assert (("ev_io_start called with negative fd", fd >= 0)); 930 assert (("ev_io_start called with negative fd", fd >= 0));
774 931
775 ev_start ((W)w, 1); 932 ev_start ((W)w, 1);
776 array_needsize (anfds, anfdmax, fd + 1, anfds_init); 933 array_needsize (anfds, anfdmax, fd + 1, anfds_init);
875 } 1032 }
876 1033
877 ev_stop ((W)w); 1034 ev_stop ((W)w);
878} 1035}
879 1036
1037#ifndef SA_RESTART
1038# define SA_RESTART 0
1039#endif
1040
880void 1041void
881ev_signal_start (struct ev_signal *w) 1042ev_signal_start (struct ev_signal *w)
882{ 1043{
883 if (ev_is_active (w)) 1044 if (ev_is_active (w))
884 return; 1045 return;
892 if (!w->next) 1053 if (!w->next)
893 { 1054 {
894 struct sigaction sa; 1055 struct sigaction sa;
895 sa.sa_handler = sighandler; 1056 sa.sa_handler = sighandler;
896 sigfillset (&sa.sa_mask); 1057 sigfillset (&sa.sa_mask);
897 sa.sa_flags = 0; 1058 sa.sa_flags = SA_RESTART; /* if restarting works we save one iteration */
898 sigaction (w->signum, &sa, 0); 1059 sigaction (w->signum, &sa, 0);
899 } 1060 }
900} 1061}
901 1062
902void 1063void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines