THRIFT-3848: Perl ForkingServer must ignore SIGCHLD to avoid infinite loop

Client: Perl
Patch: Jim King <jim.king@simplivity.com>

This closes #1040
This commit is contained in:
Jim King 2016-07-06 21:50:23 -04:00 committed by Jens Geyer
parent 4300b72b2d
commit b6983df867

View File

@ -125,7 +125,6 @@ sub _handleException
} }
} }
# #
# SimpleServer from the Server base class that handles one connection at a time # SimpleServer from the Server base class that handles one connection at a time
# #
@ -191,6 +190,9 @@ sub serve
{ {
my $self = shift; my $self = shift;
# THRIFT-3848: without ignoring SIGCHLD, perl ForkingServer goes into a tight loop
$SIG{CHLD} = 'IGNORE';
$self->{serverTransport}->listen(); $self->{serverTransport}->listen();
while (1) while (1)
{ {