Skip to main content

Module child_reaper

Module child_reaper 

Source
Expand description

Child process reaping and management.

ModulesΒ§

orphan_sweep πŸ”’
Reaping the zombies nobody claimed.
runtime_call πŸ”’
Running a runtime for a call: its output, its process group and the cleanup after a failure.
watcher πŸ”’
Watching a registered child until it exited, and what follows.

StructsΒ§

Call πŸ”’
A runtime call in progress, see Calls.
Calls πŸ”’
The runtime calls in progress, numbered in the order they started.
Candidate πŸ”’
A zombie which nobody claimed, see ChildReaper::sweep_orphans.
Child πŸ”’
A container or exec, as it gets registered with the child reaper.
ChildReaper πŸ”’
Watches the containers and execs of the server until they exit and reaps them.
ExitChannelData πŸ”’
The exit of a child, which its waiters get.
InFlight πŸ”’
Counts a runtime call as in progress until dropped. A successful ChildReaper::create_child hands it to the caller, which passes it to ChildReaper::watch_grandchild, so the call ends with the registration of its child, or wherever the caller gives up.
PendingPid πŸ”’
Marks a PID as pending for the lifetime of the guard. The marks get counted: a call keeps the mark of its runtime until it reaped it, and the PID of a runtime which got reaped may already be in use by the process of another call, whose mark must stay.
ReapableChild πŸ”’
A registered child, until its watcher ended. What only the watcher needs moves into it, see ExitHandling.
RegisteredContainer πŸ”’
A registered container, see ChildReaper::get.
WatchedExec πŸ”’
An exec which got registered, see ChildReaper::watch_exec.

EnumsΒ§

ChildKind πŸ”’
What kind of process a child is. Execs are registered under the id of their container, but only the container itself is the target of container level operations like attach or log reopening.

ConstantsΒ§

CONTAINER_NOT_FOUND πŸ”’
The start of the error of a request for a container the server does not know, clients match it, see ErrContainerNotFound of the Go client. The message of older servers is β€œchild not available”.
EXIT_CODE_NOT_STARTED πŸ”’
The exit code of an exec which could not be started, for example because the runtime failed.
EXIT_CODE_TIMED_OUT πŸ”’
The exit code of a process which did not exit before its timeout. Clients take -3 for a timeout, no other failure may report it, except for EXIT_CODE_WAIT_FAILED, which always did.

FunctionsΒ§

kill_grandchild πŸ”’
Signal a grandchild and its process group, unless it got reaped already, see Process::signal_group. The grandchildren got reparented to this subreaper, so the PID refers to a child.

Type AliasesΒ§

PendingPids πŸ”’
The pending PIDs with the number of their marks, see PendingPid.