in reply to Destructors when the program is stopped via a signal

What ikegami suggests will work. Simply installing a signal handler for INT will allow perl to call destructors before exiting. Otherwise, the default action for the INT signal is to terminate the program (abruptly).

Note that the KILL signal cannot be caught, so that will always result in the abrupt termination of the program.

Replies are listed 'Best First'.
Re^2: Destructors when the program is stopped via a signal
by merlyn (Sage) on Mar 18, 2008 at 16:28 UTC