in reply to Global SIG handler: Is this advisable? Is there a better way?
Looking at your code I wondered what was in keys(%SIG). The answer was surprising to me - what is all this junk?
$ perl -MData::Dumper -e 'print Dumper([sort keys %SIG])' $VAR1 = [ 'ABRT', 'ALRM', 'BUS', 'CHLD', 'CLD', 'CONT', 'FPE', 'HUP', 'ILL', 'INT', 'IO', 'IOT', 'KILL', 'NUM32', 'NUM33', 'NUM35', 'NUM36', 'NUM37', 'NUM38', 'NUM39', 'NUM40', 'NUM41', 'NUM42', 'NUM43', 'NUM44', 'NUM45', 'NUM46', 'NUM47', 'NUM48', 'NUM49', 'NUM50', 'NUM51', 'NUM52', 'NUM53', 'NUM54', 'NUM55', 'NUM56', 'NUM57', 'NUM58', 'NUM59', 'NUM60', 'NUM61', 'NUM62', 'NUM63', 'PIPE', 'POLL', 'PROF', 'PWR', 'QUIT', 'RTMAX', 'RTMIN', 'SEGV', 'STKFLT', 'STOP', 'SYS', 'TERM', 'TRAP', 'TSTP', 'TTIN', 'TTOU', 'UNUSED', 'URG', 'USR1', 'USR2', 'VTALRM', 'WINCH', 'XCPU', 'XFSZ', '__WARN__' ];
Interestingly, __WARN__ is there but __DIE__ isn't. I serriously doubt you want to trap and exit on warn()!
-sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Global SIG handler: Is this advisable? Is there a better way?
by snafu (Chaplain) on Aug 29, 2006 at 17:42 UTC |