doc: document how a process is killed, and how this can be customised

Reported by thewoolleyman on 2010-06-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
Low
Unassigned

Bug Description

It was very hard to find docs on exactly how 'stop' worked. I had to get the answer on IRC:

thewoolleyman: ion: how does it know what to stop and how?
ion: It runs the pre-stop command, if any, then sends SIGTERM to the main pid, then sends SIGKILL if it’s still running after a timeout and finally runs the post-stop command, if any.
[11:02am] ion: The main pid being the one “status jobname” prints.

Also, it was unclear how to stop a service which has a custom stop script/params different than start - this was answered on IRC too:

thewoolleyman: how can I tell upstart to call a stop script which is different than a start script? e.g. start is /bin/start-myservice and stop is /bin/stop-myservice?
[10:48am] ion: pre-stop exec /bin/stop-myservice. But make sure Upstart actually tracks the process started by start-myservice. The easiest way is to make it not daemonize.

It would be great if these points were made clear in the 'getting started' doc page.

Thanks...

Tags: doc Edit Tag help
Changed in upstart:
status: New → Triaged
summary: - docs unclear about how stop works
+ doc: document how a process is stopped, and how this can be customised
Changed in upstart:
importance: Undecided → Low
summary: - doc: document how a process is stopped, and how this can be customised
+ doc: document how a process is killed, and how this can be customised
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers