From 59a241f6477a09ce89ca4a7a0c2abce48562661f Mon Sep 17 00:00:00 2001 From: Wang Long Date: Tue, 20 Sep 2016 10:49:04 +0800 Subject: [PATCH] update the comment for container.Pause() method on linux if a container state is running or created, the container.Pause() method can set the state to pausing, and then paused. this patch update the comment, so it can be consistent with the code. Signed-off-by: Wang Long --- libcontainer/container_linux.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index 64331604..29c8b343 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -85,14 +85,14 @@ type Container interface { // Systemerror - System error. Restore(process *Process, criuOpts *CriuOpts) error - // If the Container state is RUNNING, sets the Container state to PAUSING and pauses + // If the Container state is RUNNING or CREATED, sets the Container state to PAUSING and pauses // the execution of any user processes. Asynchronously, when the container finished being paused the // state is changed to PAUSED. // If the Container state is PAUSED, do nothing. // // errors: // ContainerNotExists - Container no longer exists, - // ContainerNotRunning - Container not running, + // ContainerNotRunning - Container not running or created, // Systemerror - System error. Pause() error @@ -445,7 +445,7 @@ func (c *linuxContainer) Pause() error { c: c, }) } - return newGenericError(fmt.Errorf("container not running: %s", status), ContainerNotRunning) + return newGenericError(fmt.Errorf("container not running or created: %s", status), ContainerNotRunning) } func (c *linuxContainer) Resume() error {