Skip to main content

watch_group

Function watch_group 

Source
pub fn watch_group(
    watch: MemoryWatch,
    pgid: i32,
    seen: SharedSeen,
    stop: StopSender,
    kills: Counter,
    forked: bool,
) -> GroupWatch
Expand description

Watches group pgid (recording in seen) from now until the returned watch is dropped: over the budget it tells stop (StopReason::OomKilled), kills the group at once (SIGKILL) and counts it in kills. The reason goes first, so the supervisor has it before the process’s end. Started as soon as the process is, it covers a runner’s start and a stopped task’s grace period too. forked: the group’s processes share pages with a fork server, so RSS never stands in for PSS (see group_memory).