earlati2 has asked for the wisdom of the Perl Monks concerning the following question:
I write an hadler for mod_perl.
The handler seems ok and it works well but if I create a thread inside this handler with fork the new thread will never destroy.
I include the following code as example :
$pid = fork(); if( $pid == 0 ) { my $p_pid; $p_pid = getppid; print "+START Child process: $$.$p_pid " ; sleep 1; print "+EXIT Child process: $$.$p_pid "; exit; } else { my $status_pid = 0; }
each time I create the thread I got a new instance of http, which will not disappear , even after exit
nobody 20873 20816 0 09:16 ? 00:00:00 /usr/local/apache/bin/httpd nobody 20874 20817 0 09:16 ? 00:00:00 /usr/local/apache/bin/httpd
Any suggestion ?
regards, Enzo
Edited by planetscape - added code tags; changed pre to code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: thread inside mod_perl handler will never been released
by jeteve (Pilgrim) on Jul 27, 2006 at 09:06 UTC | |
by earlati2 (Beadle) on Jul 27, 2006 at 13:40 UTC |