P is for Practical | |
PerlMonks |
Re: Zombie-less forking inside a daemon?by crouchingpenguin (Priest) |
on Jun 13, 2006 at 13:57 UTC ( [id://555047]=note: print w/replies, xml ) | Need Help?? |
You want to use the double fork method that orphans your process to be reclaimed by init (PID 1). Within your child, fork again and die immediately. The original process (grandparent) then waits for the new parent while the grandchild goes off to do notifications.
cp ---- "Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."
In Section
Seekers of Perl Wisdom
|
|