Yes of course, a daemon closes all unnecessary file descriptors and forks itself and terminates, to detach from any terminal or I/O lines whatsoever. But in my book, the daemon does this right up front, before doing any other tasks.It is usually desirable to have the parent do initialization and validation before forking, so it can report failure to the command-line at launch; otherwise, success or failure are indistinguishable without digging through the logs.
In reply to Re^4: What happens to a '-|' (pipe) file handle across a fork()?
by pprindeville
in thread What happens to a '-|' (pipe) file handle across a fork()?
by pprindeville
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |