Skip to content

Commit 126ee4a

Browse files
committed
clarify kill and delete operation
Signed-off-by: lifubang <[email protected]>
1 parent 6331715 commit 126ee4a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: runtime.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,19 @@ This operation MUST run the user-specified program as specified by [`process`](c
129129
This operation MUST generate an error if `process` was not set.
130130

131131
### <a name="runtimeKill" />Kill
132-
`kill <container-id> <signal>`
132+
`kill <container-id> [-a,--all] <signal>`
133133

134134
This operation MUST [generate an error](#errors) if it is not provided the container ID.
135-
Attempting to send a signal to a container that is neither [`created` nor `running`](#state) MUST have no effect on the container and MUST [generate an error](#errors).
136-
This operation MUST send the specified signal to the container process.
135+
This operation MUST send the specified signal to the container process(without `-a`) or to all processes in the container(with `-a`).
136+
Without `-a`, attempting to send a signal to a container that is neither [`created` nor `running`](#state) MUST have no effect on the container and MUST [generate an error](#errors).
137137

138138
### <a name="runtimeDelete" />Delete
139-
`delete <container-id>`
139+
`delete [-f,--force] <container-id>`
140140

141141
This operation MUST [generate an error](#errors) if it is not provided the container ID.
142-
Attempting to `delete` a container that is not [`stopped`](#state) MUST have no effect on the container and MUST [generate an error](#errors).
143-
Deleting a container MUST delete the resources that were created during the `create` step.
142+
Without `-f`, attempting to `delete` a container that is not [`stopped`](#state) MUST have no effect on the container and MUST [generate an error](#errors).
143+
With `-f`, runtime should try its best to delete the container no matter what the state is.
144+
Deleting a container MUST delete the resources that were created during the `create` step, specially, if the container uses `shared pid namespace`, all processes inside the container's cgroup should also be killed first.
144145
Note that resources associated with the container, but not created by this container, MUST NOT be deleted.
145146
Once a container is deleted its ID MAY be used by a subsequent container.
146147

0 commit comments

Comments
 (0)