Skip to content

Commit

Permalink
clarify kill and delete operation for shared pid namespace container
Browse files Browse the repository at this point in the history
Signed-off-by: lfbzhm <[email protected]>
  • Loading branch information
lifubang committed Oct 10, 2023
1 parent 6331715 commit bd914e5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,26 @@ This operation MUST generate an error if `process` was not set.
`kill <container-id> <signal>`

This operation MUST [generate an error](#errors) if it is not provided the container ID.

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).
This operation MUST send the specified signal to the container process.

This operation MUST send the specified signal to the container's init process.

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).

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

This operation MUST [generate an error](#errors) if it is not provided the container ID.

Attempting to `delete` a container that is not [`stopped`](#state) MUST have no effect on the container and MUST [generate an error](#errors).

Deleting a container MUST delete the resources that were created during the `create` step.

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.

Note that resources associated with the container, but not created by this container, MUST NOT be deleted.

Once a container is deleted its ID MAY be used by a subsequent container.


Expand Down

0 comments on commit bd914e5

Please sign in to comment.