ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Async-Interrupt/Interrupt.pm
(Generate patch)

Comparing cvsroot/Async-Interrupt/Interrupt.pm (file contents):
Revision 1.30 by root, Tue Apr 24 22:01:59 2012 UTC vs.
Revision 1.38 by root, Sun Apr 21 09:42:27 2019 UTC

114callback just sets a global variable, as we are only interested in 114callback just sets a global variable, as we are only interested in
115synchronous signals (i.e. when the event loop polls), which is why the 115synchronous signals (i.e. when the event loop polls), which is why the
116pipe draining is not done automatically. 116pipe draining is not done automatically.
117 117
118 my $interrupt = new Async::Interrupt 118 my $interrupt = new Async::Interrupt
119 cb => sub { undef $SIGNAL_RECEIVED{$signum} } 119 cb => sub { undef $SIGNAL_RECEIVED{$signum} },
120 signal => $signum, 120 signal => $signum,
121 pipe => [$SIGPIPE->filenos], 121 pipe => [$SIGPIPE->filenos],
122 pipe_autodrain => 0, 122 pipe_autodrain => 0,
123 ; 123 ;
124 124
236 # the next line forces initialisation of internal 236 # the next line forces initialisation of internal
237 # signal handling variables, otherwise, PL_sig_pending 237 # signal handling variables, otherwise, PL_sig_pending
238 # etc. might be null pointers. 238 # etc. might be null pointers.
239 $SIG{KILL} = sub { }; 239 $SIG{KILL} = sub { };
240 240
241 our $VERSION = '1.05'; 241 our $VERSION = 1.25;
242 242
243 require XSLoader; 243 require XSLoader;
244 XSLoader::load ("Async::Interrupt", $VERSION); 244 XSLoader::load ("Async::Interrupt", $VERSION);
245} 245}
246 246
617 617
618 c_func (c_arg); 618 c_func (c_arg);
619 619
620=item $epipe->renew 620=item $epipe->renew
621 621
622Recreates the pipe (useful after a fork). The reading side will not change 622Recreates the pipe (usually required in the child after a fork). The
623it's file descriptor number, but the writing side might. 623reading side will not change it's file descriptor number, but the writing
624side might.
624 625
625=item $epipe->wait 626=item $epipe->wait
626 627
627This method blocks the process until there are events on the pipe. This is 628This method blocks the process until there are events on the pipe. This is
628not a very event-based or ncie way of usign an event pipe, but it can be 629not a very event-based or ncie way of usign an event pipe, but it can be

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines