Update containerd dependencies

sys/unix
cgroups
go-runc
console

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-07-07 11:46:54 -07:00
parent b9fb2793a8
commit d46b562043
51 changed files with 508 additions and 196 deletions

View File

@@ -12,10 +12,12 @@ func (r *Runc) command(context context.Context, args ...string) *exec.Cmd {
command = DefaultCommand
}
cmd := exec.CommandContext(context, command, append(r.args(), args...)...)
if r.PdeathSignal != 0 {
cmd.SysProcAttr = &syscall.SysProcAttr{
Pdeathsig: r.PdeathSignal,
}
cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: r.Setpgid,
}
if r.PdeathSignal != 0 {
cmd.SysProcAttr.Pdeathsig = r.PdeathSignal
}
return cmd
}

View File

@@ -42,9 +42,13 @@ func (m *defaultMonitor) Start(c *exec.Cmd) error {
}
func (m *defaultMonitor) Wait(c *exec.Cmd) (int, error) {
status, err := c.Process.Wait()
if err != nil {
if err := c.Wait(); err != nil {
if exitErr, ok := err.(*exec.ExitError); ok {
if status, ok := exitErr.Sys().(syscall.WaitStatus); ok {
return status.ExitStatus(), nil
}
}
return -1, err
}
return status.Sys().(syscall.WaitStatus).ExitStatus(), nil
return 0, nil
}

View File

@@ -39,6 +39,7 @@ type Runc struct {
Log string
LogFormat Format
PdeathSignal syscall.Signal
Setpgid bool
Criu string
SystemdCgroup string
}