peter at engcorp.com
Fri Mar 19 04:02:56 CET 2004
Laurent Vincelette wrote:
> I have a python script (file start with #!/usr/bin/python) that use
> xmlrpclib to lessen and respond on port:8000. The problem is when I
> close the shell (bash in remote with putty) the script stop to work. I
> try to start it in backgroud with & but it dosent work. Finally I copy
> and I try to modify the /etc/init.d/crond to start the script in
> services (with start-stop-demon but I have the same problem... When I
> close putty the script stop.
> Someone have a idea?
Redirect stdout and stderr to /dev/null. I'm not sure which of these --
perhaps both -- is necessary, but doing both certainly works...
That is, this should work:
yourscript.py >/dev/null 2>/dev/null &
More information about the Python-list