makow2 has asked for the wisdom of the Perl Monks concerning the following question:
Almost everything is OK. But the last child process leaves a zombie on the system. I can only do wget once and its enough to make <defunct> process. Is there any solution for this? I don't want to change forkmanager to proc::queue or something. Thanks. Makowik /Sorry for my english/#!/usr/bin/perl use HTTP::Daemon; use Parallel::ForkManager; $daemon = new HTTP::Daemon(LocalPort => 8080, LocalAddr => "127.0.0.1" +, Listen => 64, ReuseAddr => 1) or die "$!"; $pm = Parallel::ForkManager->new(3); while (1) { $inputcon = $daemon->accept(); $pm->start and next; do_client_stuff($inputcon); $pm->finish(); } sub do_client_stuff { my ($inputcon) = @_; $request = $inputcon->get_request; print $request . "\n"; $inputcon->send_error(403); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parallel::ForkManager leaves a zombie process from last child
by runrig (Abbot) on May 30, 2013 at 20:39 UTC | |
|
Re: Parallel::ForkManager leaves a zombie process from last child
by vsespb (Chaplain) on May 30, 2013 at 20:54 UTC | |
by ikegami (Patriarch) on Jun 01, 2013 at 23:15 UTC | |
| |
|
Re: Parallel::ForkManager leaves a zombie process from last child
by vsespb (Chaplain) on May 30, 2013 at 20:15 UTC | |
by makow2 (Initiate) on May 30, 2013 at 20:23 UTC | |
|
Re: Parallel::ForkManager leaves a zombie process from last child
by RichardK (Parson) on May 30, 2013 at 18:16 UTC | |
by makow2 (Initiate) on May 30, 2013 at 18:21 UTC |