Skip to content

Commit 3f431f4

Browse files
committed
Correct container.Destroy() docs
Correct container.Destroy() docs to clarify that destroy can only operate on containers in specific states. Signed-off-by: Steven Hartland <steven.hartland@multiplay.co.uk>
1 parent be33383 commit 3f431f4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libcontainer/container.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,18 @@ type BaseContainer interface {
134134
// SystemError - System error.
135135
Run(process *Process) (err error)
136136

137-
// Destroys the container after killing all running processes.
137+
// Destroys the container, if its in a valid state, after killing any
138+
// remaining running processes.
138139
//
139140
// Any event registrations are removed before the container is destroyed.
140141
// No error is returned if the container is already destroyed.
141142
//
143+
// Running containers must first be stopped using Signal(..).
144+
// Paused containers must first be resumed using Resume(..).
145+
//
142146
// errors:
147+
// ContainerNotStopped - Container is still running,
148+
// ContainerPaused - Container is paused,
143149
// SystemError - System error.
144150
Destroy() error
145151

0 commit comments

Comments
 (0)