pub struct ProcGroup {
pub exec_id: String,
pub pgid: Option<u32>,
pub started_at: u64,
pub child_exited: bool,
pub reap: bool,
pub pids: Vec<u32>,
}Expand description
One entry of GET /v1/procs: an exec’s process group as the daemon sees it.
The exec registry knows the group (pgid) and whether the direct child has
exited; /proc knows which pids are still in that group. Both halves are here
because the interesting case is their disagreement — child_exited: true with a
non-empty pids is a command that finished while something it started did not,
which is exactly what a caller asking “did this step leave anything behind”
needs to see and could not before.
Fields§
§exec_id: String§pgid: Option<u32>The process group id captured at spawn. None when the child was reaped
before it could be read, in which case pids is empty because there is no
group to scan for.
started_at: u64Seconds since the epoch on the daemon’s clock when the child was spawned.
The same convention as a hook observation’s fired_at.
child_exited: boolWhether the exec’s own child has exited. Read from the terminal marker an ack cannot take, so an acked exec still reads as exited here.
reap: boolWhether the exec was started with reap_group_on_exit.
pids: Vec<u32>Live pids whose process group is pgid, read from /proc. Zombies are not
live and are not listed. Empty once the group is gone, and empty for an
entry whose pgid is None.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProcGroup
impl<'de> Deserialize<'de> for ProcGroup
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ProcGroup
impl JsonSchema for ProcGroup
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more