From b6983df867208bb31e0de95bdfe124b0c51826ae Mon Sep 17 00:00:00 2001 From: Jim King Date: Wed, 6 Jul 2016 21:50:23 -0400 Subject: [PATCH] THRIFT-3848: Perl ForkingServer must ignore SIGCHLD to avoid infinite loop Client: Perl Patch: Jim King This closes #1040 --- lib/perl/lib/Thrift/Server.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/perl/lib/Thrift/Server.pm b/lib/perl/lib/Thrift/Server.pm index 97e662061..ac1e17ddd 100644 --- a/lib/perl/lib/Thrift/Server.pm +++ b/lib/perl/lib/Thrift/Server.pm @@ -125,7 +125,6 @@ sub _handleException } } - # # SimpleServer from the Server base class that handles one connection at a time # @@ -191,6 +190,9 @@ sub serve { my $self = shift; + # THRIFT-3848: without ignoring SIGCHLD, perl ForkingServer goes into a tight loop + $SIG{CHLD} = 'IGNORE'; + $self->{serverTransport}->listen(); while (1) {