go.mod: github.com/containerd/go-runc v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -21,6 +21,7 @@ package reaper
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
@@ -100,6 +101,13 @@ func (m *Monitor) Start(c *exec.Cmd) (chan runc.Exit, error) {
|
||||
return ec, nil
|
||||
}
|
||||
|
||||
// StartLocked starts the command and registers the process with the reaper
|
||||
func (m *Monitor) StartLocked(c *exec.Cmd) (chan runc.Exit, error) {
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
return m.Start(c)
|
||||
}
|
||||
|
||||
// Wait blocks until a process is signal as dead.
|
||||
// User should rely on the value of the exit status to determine if the
|
||||
// command was successful or not.
|
||||
|
||||
Reference in New Issue
Block a user