Add signal API to Container interface

This adds a `Signal()` method to the container interface so that the
initial process can be signaled after a Load or operation.  It also
implements signaling the init process from a nonChildProcess.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2015-08-03 16:48:19 -07:00
parent ce0a339632
commit a5ef75b681
3 changed files with 20 additions and 1 deletions
+7
View File
@@ -118,6 +118,13 @@ func (c *linuxContainer) Start(process *Process) error {
return nil
}
func (c *linuxContainer) Signal(s os.Signal) error {
if err := c.initProcess.signal(s); err != nil {
return newSystemError(err)
}
return nil
}
func (c *linuxContainer) newParentProcess(p *Process, doInit bool) (parentProcess, error) {
parentPipe, childPipe, err := newPipe()
if err != nil {