summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/controller.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/boot/controller.go')
-rw-r--r--runsc/boot/controller.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go
index 095b0a9b9..564f2d271 100644
--- a/runsc/boot/controller.go
+++ b/runsc/boot/controller.go
@@ -37,6 +37,9 @@ const (
// container..
ContainerExecute = "containerManager.Execute"
+ // ContainerPause pauses the container.
+ ContainerPause = "containerManager.Pause"
+
// ContainerProcesses is the URPC endpoint for getting the list of
// processes running in a container.
ContainerProcesses = "containerManager.Processes"
@@ -153,6 +156,12 @@ func (cm *containerManager) Checkpoint(o *control.SaveOpts, _ *struct{}) error {
return state.Save(o, nil)
}
+// Pause suspends the process in a container.
+func (cm *containerManager) Pause(_, _ *struct{}) error {
+ cm.k.Pause()
+ return nil
+}
+
// Wait waits for the init process in the given container.
func (cm *containerManager) Wait(cid *string, waitStatus *uint32) error {
// TODO: Use the cid and wait on the init process in that