Update containerd dependencies
sys/unix cgroups go-runc console Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
10
vendor/github.com/containerd/go-runc/command_linux.go
generated
vendored
10
vendor/github.com/containerd/go-runc/command_linux.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
10
vendor/github.com/containerd/go-runc/monitor.go
generated
vendored
10
vendor/github.com/containerd/go-runc/monitor.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
1
vendor/github.com/containerd/go-runc/runc.go
generated
vendored
1
vendor/github.com/containerd/go-runc/runc.go
generated
vendored
@@ -39,6 +39,7 @@ type Runc struct {
|
||||
Log string
|
||||
LogFormat Format
|
||||
PdeathSignal syscall.Signal
|
||||
Setpgid bool
|
||||
Criu string
|
||||
SystemdCgroup string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user