starting a python script as a background process
Claude Jones
claude_jones at levitjames.com
Sat Apr 9 13:37:10 UTC 2005
Oded Maimon wrote:
> run it as:
>
> nohup python scripts/sb_server.py &
>
>
> Claude Jones wrote:
>
>> I'm running Spambayes to filter spam. It's installed as a pop3 proxy
>> and is invoked by the following, run from root in a terminal window:
>>
>> cd /usr/local/bin/
>> python scripts/sb_server.py
>>
>> That results in the following:
>>
>> SpamBayes POP3 Proxy Version 1.0.4 (March 2005)
>> and engine SpamBayes Engine Version 0.3 (January 2004).
>>
>> Loading database... Listener on port 110 is proxying pop.patriot.net:110
>> User interface url is http://localhost:8880/
>>
>> The script is activated and, until I close the terminal, remains so.
>> But, it means that I have an open terminal with root running during
>> my entire session.
>> Closing the terminal kills the python script and my email.
>> I tried putting the above commands in rc.local but that aborted my
>> boot. I got the the "Loading database... Listener on port 110 is
>> proxying pop.patriot.net:110
>> User interface url is http://localhost:8880/" message, and nothing
>> more, the screen just hung.
>> Can one of you tell me if there is another way to do this? Is there a
>> way to invoke this script as a 'background process' - I'm not even
>> sure if that's the correct terminology in the world of Linux?
>>
Thank you, I didn't know about this command and after reading up on it,
I have more questions. This seems to deal with the issue of starting the
process and not having to leave the terminal window open. I didn't test
this because I have to leave in a moment. But, the other issue I had was
that when running the commands from rc.local during bootup, my bootup
stalled. Are you suggesting that using this command will also deal with
that issue?
--
Claude Jones
Bluemont, VA, USA
More information about the fedora-list
mailing list