You have all of the code that is used to daemonize a process. But the parent of fork is supposed to immediately exit. So either do that or add another fork (where the parent immediately exits) so that the daemon is the grandchild of the process that calls wait.
- tyeIn reply to Re: setsid() and complete (?) dissociation of child from parent (more fork)
by tye
in thread setsid() and complete (?) dissociation of child from parent
by perlplexer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |