python-daemon and upstart
Ben Finney
ben+python at benfinney.id.au
Sat Nov 14 03:28:31 EST 2009
Paul Rudin <paul.nospam at rudin.co.uk> writes:
> I'm experimenting with the daemon module
> <http://pypi.python.org/pypi/python-daemon/> and upstart
> <http://upstart.ubuntu.com/>.
First: Thank you for using ‘python-daemon’; it's getting more widespread
use all the time, which is really helping to find all the quirks of API
and implementation. (And good for my ego at the same time.)
> There's something I don't understand, which may be more of an upstart
> issue than a python issue, but I thought I'd start by posting here.
I'm unfamiliar with ‘upstart’, I hope others with more experience can
offer more insight.
> Here's a test script:
[…]
The program looks fine to me. What happens if you run the program,
without getting ‘upstart’ involved?
> and here's a testdaemon.conf upstart configuration:
>
> description "test daemon"
> expect daemon
> chdir /tmp
> exec /tmp/testdaemon.py
>
> If I do "sudo start testdaemon" I see the "testdaemon.py" process
> starting, and the file '/tmp/test.txt' is being written to every 5
> seconds, so everything has kicked off.
Good to know.
> The thing I don't understand is why start does not return. I guess it
> doesn't think that the process and properly started and daemonized
> itself? Quite possibly it's just that I don't understand this stuff
> well...
As I say, I'm completely unfamiliar with the details of ‘upstart’. Can
you point me to whatever you used to understand it?
--
\ “I bought some batteries, but they weren't included; so I had |
`\ to buy them again.” —Steven Wright |
_o__) |
Ben Finney
More information about the Python-list
mailing list