summaryrefslogtreecommitdiffhomepage
path: root/runsc/container/container.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/container/container.go')
-rw-r--r--runsc/container/container.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/runsc/container/container.go b/runsc/container/container.go
index b2ea78084..042c76577 100644
--- a/runsc/container/container.go
+++ b/runsc/container/container.go
@@ -353,6 +353,20 @@ func (c *Container) Wait() (syscall.WaitStatus, error) {
return c.Sandbox.Wait(c.ID)
}
+// WaitRootPID waits for process 'pid' in the sandbox's PID namespace and
+// returns its WaitStatus.
+func (c *Container) WaitRootPID(pid int32) (syscall.WaitStatus, error) {
+ log.Debugf("Wait on pid %d in sandbox %q", pid, c.Sandbox.ID)
+ return c.Sandbox.WaitPID(pid, c.Sandbox.ID)
+}
+
+// WaitPID waits for process 'pid' in the container's PID namespace and returns
+// its WaitStatus.
+func (c *Container) WaitPID(pid int32) (syscall.WaitStatus, error) {
+ log.Debugf("Wait on pid %d in container %q", pid, c.ID)
+ return c.Sandbox.WaitPID(pid, c.ID)
+}
+
// Signal sends the signal to the container.
func (c *Container) Signal(sig syscall.Signal) error {
log.Debugf("Signal container %q", c.ID)