Daemonize?

Greg Green gregory.p.green at boeing.com
Wed Sep 4 13:05:14 EDT 2002


sismex01 at hebmex.com writes:

> Sorry to ask here, but I don't have any "unixy" python
> documentation at hand.
> 
> Normally, I put an app into "daemon" mode, by first
> forking, then reopening stdin/out/err to /dev/null,
> and then forking again. Works good enough for my
> purposes.
> 
> But, am I right? Is this the correct way to do this?
> Also, I can't find any "reopen" in python to apply
> to sys.stdin/out/err.
> 
> Any help will be most appreciated.
> 
> Thanks.
> 
> -gus

The best place to look for this is either Stevens book "Advanced unix
programming" or the unix programming faq online:
http://www.erlenstar.demon.co.uk/unix/faq_toc.html see section 1.7
-- 

Greg Green




More information about the Python-list mailing list