Update go-runc to master with portability fixes. Subreaper only exists on Linux, and only Linux runs the shim in a mount namespace. With these changes the shim compiles on Darwin, which means the whole build compiles without errors now. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
22 lines
402 B
Go
22 lines
402 B
Go
package runc
|
|
|
|
import (
|
|
"context"
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
func (r *Runc) command(context context.Context, args ...string) *exec.Cmd {
|
|
command := r.Command
|
|
if command == "" {
|
|
command = DefaultCommand
|
|
}
|
|
cmd := exec.CommandContext(context, command, append(r.args(), args...)...)
|
|
if r.PdeathSignal != 0 {
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{
|
|
Pdeathsig: r.PdeathSignal,
|
|
}
|
|
}
|
|
return cmd
|
|
}
|