FWIW/AFAIK alarm interrupts your code, so you can't simply log something, then resume the thing you were interrupting ... the thing was interrupted, its finished
OTOH, the reason run() isn't interrupted is probably a safe/unsafe signals issue ... see how to use angle operator with timeout?/Re^3: how to use angle operator with timeout?
You can probably get around this by launching the run in a background process ( Proc::Background, use a file for ipc (save output of run ), then using sleep instead of alarm, then do your logging if the process isn't finished, then wait for it to finally finish, then read output of run from the file
Or similar strategy by using threads (ipc through shared hash of Q instead of files
In reply to Re: $SIG{ALRM} to just log something?
by Anonymous Monk
in thread $SIG{ALRM} to just log something?
by philkime
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |