As far as I know none of perl's functions are reentrant for signal handlers, because pretty much any perl function can allocate memory, and perl's malloc is not reentrant.
If you have a system malloc that is reentrant, and you've built perl to use it (configure option -Uusemymalloc if it isn't the default for your system), you may have better luck. But I'm not aware that anyone's done the analysis of what within perl is or isn't safe in that context.
I would normally look to do async i/o using nonblocking reads and a select() loop, as suggested by matija in his response.
Hugo
In reply to Re: Async IO / signals
by hv
in thread Async IO / signals
by powerman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |