1
0
mirror of https://github.com/opencontainers/runtime-spec.git synced 2026-02-05 18:45:18 +01:00

Merge pull request #897 from crosbymichael/pids

Make pid option on platforms other than linux
This commit is contained in:
Tianon Gravi
2017-07-12 16:20:09 -07:00
committed by GitHub
3 changed files with 2 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ The state of a container includes the following properties:
* `stopped`: the container process has exited (step 7 in the [lifecycle](#lifecycle))
Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.
* **`pid`** (int, REQUIRED when `status` is `created` or `running`) is the ID of the container process, as seen by the host.
* **`pid`** (int, REQUIRED when `status` is `created` or `running` on Linux, OPTIONAL on other platforms) is the ID of the container process, as seen by the host.
* **`bundle`** (string, REQUIRED) is the absolute path to the container's bundle directory.
This is provided so that consumers can find the container's configuration and root filesystem on the host.
* **`annotations`** (map, OPTIONAL) contains the list of annotations associated with the container.

View File

@@ -40,7 +40,6 @@
"ociVersion",
"id",
"status",
"pid",
"bundle"
]
}

View File

@@ -9,7 +9,7 @@ type State struct {
// Status is the runtime status of the container.
Status string `json:"status"`
// Pid is the process ID for the container process.
Pid int `json:"pid"`
Pid int `json:"pid,omitempty"`
// Bundle is the path to the container's bundle directory.
Bundle string `json:"bundle"`
// Annotations are key values associated with the container.