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:
Akihiro Suda
2023-05-17 13:39:31 +09:00
parent 8c21759d7c
commit 6f715ab101
21 changed files with 425 additions and 234 deletions

View File

@@ -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.