[2.4.2/Linux] Getting Python to fork?

Rolf van de Krol python at rolfvandekrol.nl
Mon Feb 4 10:40:01 EST 2008


To create a deamon, you indeed need to fork two times. For more 
information and a working example see: 
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 . I'm 
quite sure this works, because I used it several times to create a deamon.


Jon Ribbens wrote:
> On 2008-02-04, Christian Heimes <lists at cheimes.de> wrote:
>   
>>> Although bear in mind it's pretty UNIX-y.
>>>       
>> IIRC you have to fork a second time after you have changed the working
>> dir and created a new session group.
>>     
>
> Why? I don't think you do.
> Neither does BSD daemon.c or glibc daemon.c
>   



More information about the Python-list mailing list