Do as little as you possibly can in your handler; notice how all we do is set a global variable and then raise an exception. That's because on most systems, libraries are not re-entrant; particularly, memory allocation and I/O routines are not. That means that doing nearly anything in your handler could in theory trigger a memory fault and subsequent core dump.This was also the state of signal handling when Programming Perl 3rd edition was written - maybe that's where you read it?
In reply to Re: What is safe to do in an END block?
by Arunbear
in thread What is safe to do in an END block?
by Cap'n Steve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |