Skip to content

Commit 7c32f46

Browse files
committed
clarify kill and delete operation for shared pid namespace container
Signed-off-by: lfbzhm <[email protected]>
1 parent 6331715 commit 7c32f46

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: runtime.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,26 @@ This operation MUST generate an error if `process` was not set.
132132
`kill <container-id> <signal>`
133133

134134
This operation MUST [generate an error](#errors) if it is not provided the container ID.
135+
135136
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.
137+
138+
This operation MUST send the specified signal to the container's init process.
139+
140+
Specially, if the signal is `SIGKILL` and the container does not have its own private PID namespace, this operation MUST send the `SIGKILL` signal to all the processes in the container, even if the container's state is `stopped`
137141

138142
### <a name="runtimeDelete" />Delete
139143
`delete <container-id>`
140144

141145
This operation MUST [generate an error](#errors) if it is not provided the container ID.
146+
142147
Attempting to `delete` a container that is not [`stopped`](#state) MUST have no effect on the container and MUST [generate an error](#errors).
148+
143149
Deleting a container MUST delete the resources that were created during the `create` step.
150+
151+
Specially, when deleting a container, which does not have its own private PID namespace, the operation SHOULD kill all processes in this type container, and return an error if those processes can not be killed.
152+
144153
Note that resources associated with the container, but not created by this container, MUST NOT be deleted.
154+
145155
Once a container is deleted its ID MAY be used by a subsequent container.
146156

147157

0 commit comments

Comments
 (0)