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

Re: Do any one know how to make a daemon in python

In Python, you can use os.fork() and os.setsid() which are the substitutes of C's fork() and setsid() (of course, you need to import os library).
I find this example concerning a simple daemon in python, and I hope you'll find it useful:

On 12/23/07, moayyad sadi <alsadi at gmail dot com> wrote:
in C we use daemon() or fork() then setsid()
I tried the later in python but it did not work ?

what I mean, how to make a script that won't die when the caller ends
or when you close the terminal
Developer mailing list
Developer at arabeyes dot org

It is the darkest under the lighthouse