END block ignored while run_cmd() is executing

Darin McBride darin.mcbride at shaw.ca
Tue Apr 10 14:41:36 CEST 2012


On Tuesday April 10 2012 7:41:04 AM Marc Lehmann wrote:
> On Mon, Apr 09, 2012 at 11:14:07AM -0400, Fulko Hew <fulko.hew at gmail.com> 
wrote:
> > it seems that while run_cmd() is executing... if I
> > (for example) send it a INT signal, the INT signal is
> > caught, but the END block doesn't get executed.  If I
> > wait for the run_cmd() to finish and then press CTL C,
> > the END block _is_ executed.
> 
> I tried your example with the pure-perl loop, EV, Event, POE and Glib,
> with and without Async::Interrupt, and whether I wait 5 seconds or not, I
> always get:
> 
>    catcher called with 'INT'
>    INSIDE END BLOCK
> 
> My guess is that your problem is elsewhere (tty settings, shell, terminal
> emulator...), or maybe your test program works on your system, too?

As long as I wait until the "END not accessible" line to show up before I hit 
Ctrl-C, I never get the INSIDE END BLOCK output here.  I'm most likely using 
EV (since it's installed), but don't have Async::Interrupt installed.

$ ~/perl/blead/bin/perl rc.pl
END not accessible during run_cmd()... wait 5 seconds till it's done
^C
catcher called with 'INT'
$





More information about the anyevent mailing list