Documentation of 'expect stop' is a bit vague

Bug #1394744 reported by Joe Marty on 2014-11-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Upstart Cookbook
Undecided
Unassigned

Bug Description

http://upstart.ubuntu.com/cookbook/#expect-stop

This documentation comes right after the discussion of using expect fork and expect daemon, both of which talk about identifying the main PID for a process, so my interpretation was that "expect stop" could also be used to identify the main PID of a job that forks. I also didn't understand what it meant to "raise" the STOP signal (send it to itself, send it to its parent, or some other mechanism I was unaware of)

To clarify, I would change the first sentence to:

"This expect stanza is different from the other two in that it is used not to determine the PID of the main process, but to determine when the job's main process is ready. It specifies that the job's main process will raise/receive the SIGSTOP signal, and stop to indicate that it is ready."

Then, perhaps adding a couple more sentences or bullet points would help:

- This signal can be send by the process to itself, or by a child process to the main process.
- init(8) will only be watching the top-level executed process to determine when it stops (not any forked, child processes).

It's also unclear what happens if you "expect fork" AND "expect stop" (or whether they can be combined successfully)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers