Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: fork problem

by etcshadow (Priest)
on Jun 28, 2005 at 13:51 UTC ( #470629=note: print w/ replies, xml ) Need Help??


in reply to fork problem

Apache has a somewhat complicated relationship with children. In order to handle this well, you'll want to use Apache::SubProcess and its "cleanup_for_exec" subroutine (in the newly forked child) to better cut the ties between the parent and the forked child.

Also, if you're running under mod_perl, you'll want to be careful to make the child "CORE::exit", rather than just "exit", since, under mod_perl, exit is really just a signal to finish the request and return the (not dead!) process to the pool of processes waiting to accept new socket connections.

------------ :Wq Not an editor command: Wq


Comment on Re: fork problem
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://470629]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2015-07-07 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (90 votes), past polls