ShutdownReport Type
The observed facts of one graceful `ProcessGroup` teardown, returned by `ProcessGroup.ShutdownReportAsync`. Where the fire-and-forget `ShutdownAsync` reports only success or a thrown exception, this carries what the teardown **actually observed**: which soft signal was attempted and whether it landed, how many members were alive before and after, whether the tree drained within the grace or had to be hard-killed, and how long it really took. A consumer that owns its own end-of-run race (a deadline that is not a fixed timeout, but a timeout x Ctrl-C x control-socket race) can report the *observed* tier instead of re-deriving it from `ShutdownAsync`'s bare success. # Point-in-time member counts `MembersBefore`/`MembersAfter` count the same member set `ProcessGroup.Members` reports — the whole tree on the Windows Job Object and Linux cgroup v2 mechanisms and on the FreeBSD process reaper (which reads the live tree from `PROC_REAP_GETPIDS`, zombies excluded), the tracked group **leaders** on the POSIX process-group fallback (macOS / the other BSDs / Linux without cgroup v2). Each is `None` only if that membership read failed (an unreadable `cgroup.procs`, a failed Job Object query), never a fabricated `0`. # Unconditional teardown — same guarantee as `ShutdownAsync` This still tears the group down exactly like `ShutdownAsync`: the soft signal, then the grace, then an unconditional hard kill of any survivor, then release. There is no "spare the survivors, keep the group usable" mode here — see `ProcessGroup.ShutdownReportAsync`'s own doc comment for why this port does not offer one. `Escalated` reports whether that hard kill actually fired; it is never a choice the caller can suppress. # Sealed, accessor-only A read-only snapshot the library produces: sealed with an internal constructor so it can gain fields across minor releases without a breaking change, and each fact is exposed through a property (documenting its own platform caveats) rather than a public field.
Instance members
| Instance member |
Description
|
|
The soft `Signal` the teardown attempted, or `None` where the platform has no soft-signal tier (`SoftSignalDelivery.Unsupported`). A convenience over `SoftSignal.AttemptedSignal`.
|
Full Usage:
this.DrainedWithinGrace
Returns: bool
|
Whether the tree **drained within the grace window**, before any hard kill — every member exited in response to the soft signal in time. `false` means the grace elapsed with survivors still alive (which were then hard-killed — see `Escalated`), or that there was no soft tier to drain on (a windowless Windows Job Object), unless the group was already empty.
|
|
How long the teardown **actually took** — from issuing the soft signal to the final drain/kill decision. An early drain reports a short duration (it does not spend the whole grace); a tree that rides out the grace reports roughly the grace plus the escalation.
|
Full Usage:
this.Escalated
Returns: bool
|
Whether the teardown **escalated to a hard kill** (`SIGKILL` / the atomic Job terminate) because the tree had not drained within the grace. `false` for a tree that drained in time, and for an already-empty group (nothing to kill).
|
Full Usage:
this.MembersAfter
Returns: int option
|
How many members were still alive **after** the grace window and any hard kill, or `None` if the membership could not be read.
|
Full Usage:
this.MembersBefore
Returns: int option
|
How many members were alive **before** the soft signal, or `None` if the membership could not be read. See the type-level note on which member set this counts.
|
|
The fate of the best-effort soft-signal tier: `Sent`, `Unsupported`, or `Failed` (see `SoftSignalDelivery`). Distinct from the hard kill — see `Escalated`.
|
ProcessKit API Reference