initctl: send signals to jobs

Bug #403478 reported by ensc
This bug report is a duplicate of:  Bug #94873: init: support custom actions. Edit Remove
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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).

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

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)

summary: - RFE: add way to send signals to jobs
+ initctl: send signals to jobs
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.