Notes:my $oldhandler = $SIG{SOMETHING}; $SIG{SOMETHING} = sub { # do whatever if ($oldhandler) { $oldhandler->(); } };
1. this assumes that the other code does something like this as well, or that your handler is installed after the old one. See for instance my pretty simple CGI::HTMLError.
2. some kinds of signals (like SIGCHLD) are more complicated than this and may need special care.
In reply to Re: Chaining/Stacking $SIG{__WARN__}
by Joost
in thread Chaining/Stacking $SIG{__WARN__}
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |