Subject: | [Feature Request] Add shutdown hooks |
At present, if the Perl interpreter is terminated for an unusual reason, END may not get called, as demonstrated by this snippet:
perl -e 'while(1){ } END { print "END" } '
^C
its evident to note that ^C stops the END being reached, despite it being a legitimate way to terminate the process. This leaves a spawned mpd child floating around unreaped which is somewhat annoying.
perl -MTest::Corpus::Audio::MPD
^C
perl -MTest::Corpus::Audio::MPD
mpd is running
Compilation failed in require.
BEGIN failed--compilation aborted.
This is somewhat undesirable, but its not really a critical feature which is why I've wish-listed it.
perl -e 'while(1){ } END { print "END" } '
^C
its evident to note that ^C stops the END being reached, despite it being a legitimate way to terminate the process. This leaves a spawned mpd child floating around unreaped which is somewhat annoying.
perl -MTest::Corpus::Audio::MPD
^C
perl -MTest::Corpus::Audio::MPD
mpd is running
Compilation failed in require.
BEGIN failed--compilation aborted.
This is somewhat undesirable, but its not really a critical feature which is why I've wish-listed it.