Skip to content

Commit d3c8849

Browse files
committed
Make pid option on platforms other than linux
Signed-off-by: Michael Crosby <[email protected]>
1 parent a7bc89b commit d3c8849

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The state of a container includes the following properties:
2222
* `stopped`: the container process has exited (step 7 in the [lifecycle](#lifecycle))
2323

2424
Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.
25-
* **`pid`** (int, REQUIRED when `status` is `created` or `running`) is the ID of the container process, as seen by the host.
25+
* **`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.
2626
* **`bundle`** (string, REQUIRED) is the absolute path to the container's bundle directory.
2727
This is provided so that consumers can find the container's configuration and root filesystem on the host.
2828
* **`annotations`** (map, OPTIONAL) contains the list of annotations associated with the container.

schema/state-schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"ociVersion",
4141
"id",
4242
"status",
43-
"pid",
4443
"bundle"
4544
]
4645
}

specs-go/state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type State struct {
99
// Status is the runtime status of the container.
1010
Status string `json:"status"`
1111
// Pid is the process ID for the container process.
12-
Pid int `json:"pid"`
12+
Pid int `json:"pid,omitempty"`
1313
// Bundle is the path to the container's bundle directory.
1414
Bundle string `json:"bundle"`
1515
// Annotations are key values associated with the container.

0 commit comments

Comments
 (0)