pub async fn supervise<P: Process>(
process: &mut P,
limits: Limits,
stops: Stops,
) -> Result<Supervised>Expand description
Waits for process; on timeout, or at the first reason from stop (cancel, drain), sends
SIGTERM to its group, and SIGKILL if it hasn’t ended after the grace time (the interrupt
grace for a drain’s interrupt, also when the interrupt comes during another reason’s
grace); over its memory budget (StopReason::OomKilled), SIGKILL at once.
§Errors
Returns an I/O error from waiting or signalling.