Skip to content

Commit 7797b33

Browse files
committed
runtime: Replace "process is stopped" with "process exits"
proc(5) describes the following state entries in proc/[pid]/stat [1] (for modern kernels): * R Running * S Sleeping in an interruptible wait * D Waiting in uninterruptible disk sleep * Z Zombie * T Stopped (on a signal) * t Tracing stop * X Dead and ps(1) has a bit more context [2] (for modern kernels): * D uninterruptible sleep (usually IO) * R running or runnable (on run queue) * S interruptible sleep (waiting for an event to complete) * T stopped by job control signal * t stopped by debugger during the tracing * X dead (should never be seen) * Z defunct ("zombie") process, terminated but not reaped by its parent So I expect "stopped" to mean "process still exists but is paused, e.g. by SIGSTOP". And I expect "exited" to mean "process has finished and is either a zombie or dead". After this commit, 'git grep -i stop' only turns up poststop-hook stuff, a reference in principles.md, a "stoppage" in LICENSE, and some ChangeLog entries. Also replace "container's process" with "container process" to match usage in the rest of the repository. After this commit: $ git grep -i "container process" | wc -l 16 $ git grep -i "container's process" | wc -l 1 Also reword status entries to avoid "running", which is less precise in our spec (e.g. it also includes "sleeping", "waiting", ...). Also removes a "them" leftover from a partial plural -> singular reroll of be59415 (Split create and start, 2016-04-01, #384). [1]: http://man7.org/linux/man-pages/man5/proc.5.html [2]: http://man7.org/linux/man-pages/man1/ps.1.html Signed-off-by: W. Trevor King <[email protected]>
1 parent 41ef05e commit 7797b33

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

runtime.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ This MUST be unique across all containers on this host.
1515
There is no requirement that it be unique across hosts.
1616
* **`status`**: (string) is the runtime state of the container.
1717
The value MAY be one of:
18-
* `created`: the container has been created but the user-specified code has not yet been executed
19-
* `running`: the container has been created and the user-specified code is running
20-
* `stopped`: the container has been created and the user-specified code has been executed but is no longer running
18+
* `created`: the container process has neither exited nor executed the user-specified code
19+
* `running`: the container process has executed the user-specified code but has not exited
20+
* `stopped`: the container process has exited
2121

2222
Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.
2323
* **`pid`**: (int) is the ID of the container process, as seen by the host.
@@ -55,8 +55,8 @@ The lifecycle describes the timeline of events that happen from when a container
5555
However, some actions might only be available based on the current state of the container (e.g. only available while it is started).
5656
4. Runtime's [`start`](runtime.md#start) command is invoked with the unique identifier of the container.
5757
The runtime MUST run the user-specified code, as specified by [`process`](config.md#process-configuration).
58-
5. The container's process is stopped.
59-
This MAY happen due to them erroring out, exiting, crashing or the runtime's [`kill`](runtime.md#kill) operation being invoked.
58+
5. The container process exits.
59+
This MAY happen due to erroring out, exiting, crashing or the runtime's [`kill`](runtime.md#kill) operation being invoked.
6060
6. Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container.
6161
The container MUST be destroyed by undoing the steps performed during create phase (step 2).
6262

0 commit comments

Comments
 (0)