END block ignored while run_cmd() is executing

Fulko Hew fulko.hew at gmail.com
Tue Apr 10 14:40:44 CEST 2012


On 4/10/12, Marc Lehmann <schmorp at schmorp.de> 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?

For another independent test, I just booted Fedora 16 (KDE) Live,
and tried to run that test example (without any changes/downloads etc.
to the booted system, because Coro, AnyEvent, and AnyEvent:Uti
are already part of that distribution.)

It failed, just as originally reported, witness below...

[liveuser at localhost ~]$ ./tst
END not accessible during run_cmd()... wait 5 seconds till its done
^C
catcher called with 'INT'
[liveuser at localhost ~]$ ./tst
END not accessible during run_cmd()... wait 5 seconds till its done
run_cmd() done, END is now reachable on CTL C
^C
catcher called with 'INT'
INSIDE END BLOCK
[liveuser at localhost ~]$



More information about the anyevent mailing list