Fix for forkserver breakage
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@501 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
e100e3d67a
commit
51f1f32928
@ -71,12 +71,6 @@ $ENV{PATH} = '/bin:/usr/bin:/var/qmail/bin';
|
|||||||
my %childstatus = ();
|
my %childstatus = ();
|
||||||
|
|
||||||
sub REAPER {
|
sub REAPER {
|
||||||
# foreach my $chld (keys %childstatus) {
|
|
||||||
# if (defined(waitpid($chld, WNOHANG))) {
|
|
||||||
# ::log(LOGINFO,"cleaning up after $chld");
|
|
||||||
# delete $childstatus{$chld};
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
while ( defined(my $chld = waitpid(-1, WNOHANG)) ){
|
while ( defined(my $chld = waitpid(-1, WNOHANG)) ){
|
||||||
last unless $chld > 0;
|
last unless $chld > 0;
|
||||||
::log(LOGINFO,"cleaning up after $chld");
|
::log(LOGINFO,"cleaning up after $chld");
|
||||||
@ -180,6 +174,9 @@ while (1) {
|
|||||||
# possible something condition...
|
# possible something condition...
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Make this client blocking while we figure out if we actually want to
|
||||||
|
# do something with it.
|
||||||
IO::Handle::blocking($client, 1);
|
IO::Handle::blocking($client, 1);
|
||||||
my ($port, $iaddr) = sockaddr_in($hisaddr);
|
my ($port, $iaddr) = sockaddr_in($hisaddr);
|
||||||
if ($MAXCONNIP) {
|
if ($MAXCONNIP) {
|
||||||
@ -225,6 +222,8 @@ while (1) {
|
|||||||
|
|
||||||
$::LineMode = 1;
|
$::LineMode = 1;
|
||||||
|
|
||||||
|
# Make this client non-blocking so it works with the Danga framework
|
||||||
|
IO::Handle::blocking($client, 0);
|
||||||
my $qp = Qpsmtpd::PollServer->new($client);
|
my $qp = Qpsmtpd::PollServer->new($client);
|
||||||
$qp->load_plugins;
|
$qp->load_plugins;
|
||||||
$qp->init_logger;
|
$qp->init_logger;
|
||||||
|
Loading…
Reference in New Issue
Block a user