mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user