/srv/irclogs.ubuntu.com/2013/01/11/#upstart.txt

SegFaultAXI have a trivial upstart script (basically just the exec line). `service myserv start` works as expected, but `service myserv stop` does not (errors with "Unknown instance")01:01
SegFaultAXThe /var/run/myserv.pid is being updated correctly.01:02
stgrabersounds like that service is forking and you're missing an "expect fork" or "expect daemon" statement01:20
SegFaultAXstgraber: So that's the strange bit...01:27
SegFaultAXstgraber: It seems like my program is actually writing its pre-daemonized pid to the pidfile.01:28
SegFaultAX(uwsgi in this case). But I do have an expect fork, should it be expect daemon?01:28
SegFaultAXstgraber: Pff, you're a king. Got it.01:30
SpamapSseems like everybody has been fighting uwsgi + upstart these days01:51
stgraberSegFaultAX: most daemons do double-fork, those need "expect daemon", for simple fork, "expect fork" is enough. If you're not familiar with the code of the daemon, you basically have to try and see which works.01:53
SpamapSI dunno if I'd say most daemons do01:58
SpamapSin my experience it has been 50/5001:58
SpamapSsince its not actually necessary to fork twice01:58
SegFaultAXSpamapS: Is it not? I thought you need 2 to ensure your process doesn't reconnect to a tty by accident?02:08
SpamapSnope02:23
SpamapSSegFaultAX: you just have to close/setsid properly.02:24

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!