Skip to content

Commit bd914e5

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

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

runtime.md

Lines changed: 11 additions & 1 deletion
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 use 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`. If there is no process left in this type container, the operation MUST [generate an error](#errors).
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 use its own private PID namespace, the operation should ensure kill all processes in this type container, and ensure no process left in it.
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)