summaryrefslogtreecommitdiff
path: root/lib/perl
diff options
context:
space:
mode:
authorJim King <jim.king@simplivity.com>2016-07-06 21:50:23 -0400
committerJens Geyer <jensg@apache.org>2016-07-17 18:00:24 +0200
commitb6983df867208bb31e0de95bdfe124b0c51826ae (patch)
tree78ac167ae238e4bc85131b5782ecc6e079c26002 /lib/perl
parent4300b72b2dce36f1cccb71bcabe8f6c42e888ab3 (diff)
downloadthrift-b6983df867208bb31e0de95bdfe124b0c51826ae.tar.gz
THRIFT-3848: Perl ForkingServer must ignore SIGCHLD to avoid infinite loop
Client: Perl Patch: Jim King <jim.king@simplivity.com> This closes #1040
Diffstat (limited to 'lib/perl')
-rw-r--r--lib/perl/lib/Thrift/Server.pm4
1 files changed, 3 insertions, 1 deletions
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)
{