From: Bill Erickson Date: Wed, 26 Jun 2013 18:51:52 +0000 (-0400) Subject: LP1204123 Set SIGCHLD handler to DEFAULT for children (perl) X-Git-Tag: osrf_rel_2_3_0-beta~43 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c69aced833683b5256554330aa652f3dd7556d10;p=OpenSRF.git LP1204123 Set SIGCHLD handler to DEFAULT for children (perl) Remove the special SIGCHLD handler applied to the parent/listener process from spawned child processes (drones) by setting child handler to DEFAULT. Otherwise, if an OpenSRF drone process spawns a sub-process, the drone will execute the SIGCHLD handler meant for the Listener when the sub-process dies, wherein hijinks ensue. Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson --- diff --git a/src/perl/lib/OpenSRF/Server.pm b/src/perl/lib/OpenSRF/Server.pm index d8103b6..1257a9c 100644 --- a/src/perl/lib/OpenSRF/Server.pm +++ b/src/perl/lib/OpenSRF/Server.pm @@ -449,7 +449,7 @@ sub spawn_child { } else { # child process - $SIG{$_} = 'DEFAULT' for (qw/INT TERM QUIT HUP/); + $SIG{$_} = 'DEFAULT' for (qw/INT TERM QUIT HUP CHLD/); if($self->{stderr_log}) {