On 20/10/2014 13:20, Mike Crowe wrote:
Ensure that everything is cleaned up even if get_iplayer is killed by other
signals.

Signed-off-by: Mike Crowe <[email protected]>
---
  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";


Signal handlers get reset and restored in run_cmd(). Did you intentionally leave that code as-is? It seems like you would want to handle HUP and ALRM there as well. That's where get_iplayer spends most of its time, running rtmpdump.

_______________________________________________
get_iplayer mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/get_iplayer

Reply via email to