On Mon, 04 Feb 2008 16:40:01 +0100, Rolf van de Krol
<[EMAIL PROTECTED]> wrote:
>To create a deamon, you indeed need to fork two times.
Do I really need this much complication just to exit the script and
let a child handle the pop-up?
I've changed this line, and the parent still doesn't return, a
On 2008-02-04, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Jon Ribbens wrote:
>> Why? I don't think you do.
>> Neither does BSD daemon.c or glibc daemon.c
>
> The problem is well documented at
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012
OK I understand what is being said here
On 2008-02-04, Rolf van de Krol <[EMAIL PROTECTED]> wrote:
> 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
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 H
Jon Ribbens wrote:
> Why? I don't think you do.
> Neither does BSD daemon.c or glibc daemon.c
The problem is well documented at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012
"""
The second fork _is_ necessary, Jonathan Bartlett, 2003/10/31
The first fork accomplishes two things -
On 2008-02-04, Christian Heimes <[EMAIL PROTECTED]> 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
--
http:
Jon Ribbens wrote:
> This should work I believe:
>
> if os.fork():
> os._exit(0)
> os.setsid()
> os.chdir("/")
> fd = os.open("/dev/null", os.O_RDWR)
> os.dup2(fd, 0)
> os.dup2(fd, 1)
> os.dup2(fd, 2)
> if fd > 2:
> os.close(fd)
> # do stuff
>
> Although bear in mind it'
On 2008-02-04, Gilles Ganault <[EMAIL PROTECTED]> wrote:
> I need to launch a Python script, and fork it so that the calling
> script can resume with the next step will the Python script keeps
> running.
>
> I tried those two, but they don't work, as the calling script is stuck
> until the Py
Gilles Ganault wrote:
> Hello
>
> I need to launch a Python script, and fork it so that the calling
> script can resume with the next step will the Python script keeps
> running.
>
> I tried those two, but they don't work, as the calling script is stuck
> until the Python script ends:
>
> sys
Hello
I need to launch a Python script, and fork it so that the calling
script can resume with the next step will the Python script keeps
running.
I tried those two, but they don't work, as the calling script is stuck
until the Python script ends:
sys.stdout = open(os.devnull, 'w')
10 matches
Mail list logo