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'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. Christian -- http://mail.python.org/mailman/listinfo/python-list
