Problem with asyncore and Python2.0

Craig Findlay craigf at ilid.com.au
Tue Apr 17 21:32:13 EDT 2001


Thanks Michael, I'm not sure if that is my problem but I will try it.

Craig

Michael Ströder <michael at stroeder.com> wrote:

>How about using command "nohup" to detach the process from the
>console? (Might need redirecting of stdout and stderr on startup
>command-line).
>
>You can also add a fork call to your script to detach from the
>console at startup automatically.
>
>Here's what I'm doing:
>
>if (os.name == 'posix') and run_detached:
>  if os.fork():
>    sys.exit(0)
>  else:
>    os.setsid()
>    RunServer(...)
>
>You might wanna change current directory to /, close sys.stdin and
>redirect  sys.stdout and sys.stderr to some meaningful in your
>situation.
>
>Ciao, Michael.




More information about the Python-list mailing list