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

Comparing libev/ev.c (file contents):
Revision 1.74 by root, Tue Nov 6 16:51:20 2007 UTC vs.
Revision 1.75 by root, Tue Nov 6 19:29:20 2007 UTC

541 541
542 if (!gotsig) 542 if (!gotsig)
543 { 543 {
544 int old_errno = errno; 544 int old_errno = errno;
545 gotsig = 1; 545 gotsig = 1;
546#ifdef WIN32
547 send (sigpipe [1], &signum, 1, MSG_DONTWAIT);
548#else
546 write (sigpipe [1], &signum, 1); 549 write (sigpipe [1], &signum, 1);
550#endif
547 errno = old_errno; 551 errno = old_errno;
548 } 552 }
549} 553}
550 554
551static void 555static void
552sigcb (EV_P_ struct ev_io *iow, int revents) 556sigcb (EV_P_ struct ev_io *iow, int revents)
553{ 557{
554 WL w; 558 WL w;
555 int signum; 559 int signum;
556 560
561#ifdef WIN32
562 recv (sigpipe [0], &revents, 1, MSG_DONTWAIT);
563#else
557 read (sigpipe [0], &revents, 1); 564 read (sigpipe [0], &revents, 1);
565#endif
558 gotsig = 0; 566 gotsig = 0;
559 567
560 for (signum = signalmax; signum--; ) 568 for (signum = signalmax; signum--; )
561 if (signals [signum].gotsig) 569 if (signals [signum].gotsig)
562 { 570 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines