Silly me! Yes, calling die when STDERR is redirected to /dev/null seems pointless except to stop the script. For this exit would suffice.
That said, I believe it is done before the fork is perform because the child inherits the file descriptors like STDIN and STDOUT.(1)
Nevertheless, I made the modifications you suggest and the daemon is still detached from the terminal such that it keeps running when I disconnect my terminal. Maybe someone can explain to me what is happening here?
--blm--In reply to Re: Re: Re: how to make a demon in perl?
by blm
in thread how to make a demon in perl?
by Sihal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |