tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to properly daemonize?



On Wed, Jul 12, 2017 at 04:12:55PM +0200, Edgar Fu? wrote:
> I know about daemon(3). I'm aware this question is not NetBSD-specific. 
> However, I want to be able to write portable code. Plus there's so much 
> nonsense around on the subject that I want to make sure I'm understanding 
> things correctly in the end.
> 
> Steps to daemonize:

The list in _Advanced Programming in the Unix Environment_ is close to
yours but catches a few other details - like setting the umask to 0.  There
is a (hopefully authorized) copy of the book at
http://poincare.matf.bg.ac.rs/~djenic/apue.pdf - see the beginning of
chapter 13, section 13.3.

Thor


Home | Main Index | Thread Index | Old Index