… | |
… | |
114 | callback just sets a global variable, as we are only interested in |
114 | callback just sets a global variable, as we are only interested in |
115 | synchronous signals (i.e. when the event loop polls), which is why the |
115 | synchronous signals (i.e. when the event loop polls), which is why the |
116 | pipe draining is not done automatically. |
116 | pipe 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 | |
622 | Recreates the pipe (useful after a fork). The reading side will not change |
622 | Recreates the pipe (usually required in the child after a fork). The |
623 | it's file descriptor number, but the writing side might. |
623 | reading side will not change it's file descriptor number, but the writing |
|
|
624 | side might. |
624 | |
625 | |
625 | =item $epipe->wait |
626 | =item $epipe->wait |
626 | |
627 | |
627 | This method blocks the process until there are events on the pipe. This is |
628 | This method blocks the process until there are events on the pipe. This is |
628 | not a very event-based or ncie way of usign an event pipe, but it can be |
629 | not a very event-based or ncie way of usign an event pipe, but it can be |