[PATCH] Clean up correctly on more signals

Mike Crowe mac at mcrowe.com
Mon Oct 20 05:20:56 PDT 2014


Ensure that everything is cleaned up even if get_iplayer is killed by other
signals.

Signed-off-by: Mike Crowe <mac at mcrowe.com>
---
 get_iplayer |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/get_iplayer b/get_iplayer
index 6225c74..5079742 100755
--- a/get_iplayer
+++ b/get_iplayer
@@ -573,7 +573,7 @@ for ( progclass() ) {
 }
 
 # Setup signal handlers
-$SIG{INT} = $SIG{PIPE} = \&cleanup;
+$SIG{TERM} = $SIG{HUP} = $SIG{ALRM} = $SIG{INT} = $SIG{PIPE} = \&cleanup;
 
 # Other Non option-dependant vars
 my $historyfile		= "${profile_dir}/download_history";
-- 
1.7.10.4




More information about the get_iplayer mailing list