initctl: send signals to jobs
Bug #403478 reported by
ensc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
New
|
Undecided
|
Unassigned |
Bug Description
It would be nice when signals could be sent to jobs in a way like
initctl kill -USR2 foo
Although you could use 'initctl status' output to get the pid and call 'kill' then, this is error prone because:
* you have to parse human readable output
* there is a race between 'initctl status' and the 'kill' where job might vanish and a completely different process with same pid be started
Hence, this functionality should be implemented within upstart, so that signal is sent only, when job is not destroyed yet (e.g. wait(2) did not returned yet).
To post a comment you must log in.
I didn't realise that there was already a duplicate of this until I read it.
The proposed way to do this is through custom actions, rather than directly naming the signal in initctl (thus a job would define the signals it wants to receive, and give them more descriptive names)