services
John Hazen
see_below at hazen.net
Fri Mar 19 06:13:02 EST 2004
* Laurent Vincelette <lvincelette at videotron.ca> [2004-03-18 19:53]:
> 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?
try:
% nohup file.py &
It redirects the output (and stderr) to ./nohup.out, and prevents the
HUP signal from being sent to the process when you log out.
And if you want the service to run at startup, I'd probably create a
separate startup script (if it's running as a permament service, I don't
think cron has anything to do with it) which launches it and redirects
the output.
-John
<my first name> at hazen.net
More information about the Python-list
mailing list