in reply to Re^3: What happens to a '-|' (pipe) file handle across a fork()?
in thread What happens to a '-|' (pipe) file handle across a fork()?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: What happens to a '-|' (pipe) file handle across a fork()?
by shmem (Chancellor) on Nov 10, 2015 at 11:13 UTC |