From 660977c24872a859139bb0a18b0475be40f27b1b Mon Sep 17 00:00:00 2001 From: Yukimasa TAKANO Date: Thu, 20 Dec 2007 10:19:43 +1300 Subject: [PATCH] child handler overwritten at send message Some child process call message_user() with SIG{CHLD} = 'IGNORE', but overwrite to chld_handler() at finish sending message. That is wrong. This patch allows to keep SIG{CHLD} to 'IGNORE' after sending message. --- src/spong-server.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spong-server.pl b/src/spong-server.pl index 0f97779..e832e2d 100755 --- a/src/spong-server.pl +++ b/src/spong-server.pl @@ -1207,6 +1207,7 @@ sub message_user { if (! defined $duration || $duration eq "") { $duration = 0; } + my $child_handler = $SIG{'CHLD'}; $SIG{'CHLD'} = 'IGNORE'; # if message type was 'status' and messaging is allowed @@ -1266,7 +1267,7 @@ sub message_user { $message, 1 ); } - $SIG{'CHLD'} = \&chld_handler; + $SIG{'CHLD'} = $child_handler; } # This func takes care of sending out the notification message by calling -- 2.30.2