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
( keep:2 edit:28 reap:0 )
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.