Writing a simple linux daemon type thing...
jones at jones.jones
Fri Jun 14 08:44:14 EDT 2002
"Radovan Garabik" <spam at melkor.dnp.fmph.uniba.sk> wrote in message
news:rn3cea.rt4.ln at 127.0.0.1...
> Jones <jones at jones.jones> wrote:
> : Hi everyone,
> : I hope this is a simple question for you guys. I'm new to Python and
> : I'm wondering if Python (and this group) can help me.
> : I want a program to always be running in the background that, connects
> : PostgreSQL every few seconds, queries a table, and for each record it
> : shells out to the system to execute program.
> : My research indicates that "nohup" might do the trick? So would it be
> : simple as writing the program in Python and then puting something like
> : "nohup python myprog" in the Linux startup sequence (wherever that may
> (python myprog &
> would be probably better)
Thank you for you reply. Just one more question. Doing what you suggest
was my first thought. But I thought I read somewhere last night that using
"&" was not a good idea..... I have no idea why (it sounds good to me), but
I guess I just want to understand the difference between running it as a
"daemon" and just running it the background... if there is one. Or maybe
someone has a URL with a good discussion on this someone could point me to.
More information about the Python-list