Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 9661
Status: resolved
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: hdp [...] icgroup.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Date: Wed, 12 Jan 2005 15:42:08 -0500
From: Hans Dieter Pearcey <hdp [...] icgroup.com>
To: bug-net-server [...] rt.cpan.org
Subject: bug in the forking Net::Server personalities
PreFork and PreForkSimple should *not* have SIG{CHLD} handlers set up in run_child -- what that means is that running any external programs causes the child to exit immediately, as demonstrated by: $ perl -e 'use base qw(Net::Server::PreForkSimple); __PACKAGE__->run(log_level => 4); sub process_request { `true` }' Every incoming request kills a child. Won't someone think of the children? hdp. diff -Nburd Net-Server-0.87.orig/lib/Net/Server/PreFork.pm Net-Server-0.87/lib/Net/Server/PreFork.pm --- Net-Server-0.87.orig/lib/Net/Server/PreFork.pm 2004-02-15 00:52:50.000000000 -0500 +++ Net-Server-0.87/lib/Net/Server/PreFork.pm 2005-01-12 15:40:26.000000000 -0500 @@ -221,7 +221,7 @@ ### restore sigs (turn off warnings during) $SIG{INT} = $SIG{TERM} = $SIG{QUIT} - = $SIG{CHLD} = sub { + = sub { $self->child_finish_hook; exit; }; diff -Nburd Net-Server-0.87.orig/lib/Net/Server/PreForkSimple.pm Net-Server-0.87/lib/Net/Server/PreForkSimple.pm --- Net-Server-0.87.orig/lib/Net/Server/PreForkSimple.pm 2003-03-29 15:42:40.000000000 -0500 +++ Net-Server-0.87/lib/Net/Server/PreForkSimple.pm 2005-01-12 15:40:11.000000000 -0500 @@ -177,7 +177,7 @@ ### restore sigs (turn off warnings during) $SIG{INT} = $SIG{TERM} = $SIG{QUIT} - = $SIG{CHLD} = sub { + = sub { $self->child_finish_hook; exit; };