in reply to thread inside mod_perl handler will never been released
Your father should wait for your child, otherwise the child might become a zombie... Brrrrr.
see : forkIf you really want the father to resign his soon, hence letting the son dying alone, consider the following code:
Hope it helps.#! /usr/bin/perl # # Playing with processes ... use POSIX qw(setsid); if ( $pid = fork()){ print "I am the father..\n"; print " Child pid : $pid \n"; } else{ setsid(); close STDIN ; # Inside a web server close STDERR ; # Idem close STDOUT ; # Idem print "\nI am the child \n"; print "I am $$\n"; $timer= 30 ; sleep($timer); print "\nWahhh, i am awake after $timer seconds \n"; } exit 0 ;
-- Nice photos of naked perl sources here !
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: thread inside mod_perl handler will never been released
by earlati2 (Beadle) on Jul 27, 2006 at 13:40 UTC |