From f72d219ad003c87fd6fa7e2ee354c3a5169b2f28 Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Mon, 11 Apr 2011 19:57:53 +0200 Subject: [PATCH] do cleanup (e.g. kill dns-sd) also for $SIG{__DIE__} --- shairport.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shairport.pl b/shairport.pl index 74ed7a05..63c29e32 100755 --- a/shairport.pl +++ b/shairport.pl @@ -85,7 +85,7 @@ $SIG{CHLD} = \&REAP; my %conns; -$SIG{TERM} = $SIG{INT} = sub { +$SIG{TERM} = $SIG{INT} = $SIG{__DIE__} = sub { print "killed\n"; map { eval { kill $_->{decoder_pid} } } keys %conns; kill 9, $avahi_publish;