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.
- Child
Reaper π - Watches the containers and execs of the server until they exit and reaps them.
- Exit
Channel πData - The exit of a child, which its waiters get.
- InFlight π
- Counts a runtime call as in progress until dropped. A successful
ChildReaper::create_childhands it to the caller, which passes it toChildReaper::watch_grandchild, so the call ends with the registration of its child, or wherever the caller gives up. - Pending
Pid π - 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.
- Reapable
Child π - A registered child, until its watcher ended. What only the watcher needs
moves into it, see
ExitHandling. - Registered
Container π - A registered container, see
ChildReaper::get. - Watched
Exec π - An exec which got registered, see
ChildReaper::watch_exec.
EnumsΒ§
- Child
Kind π - 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
ErrContainerNotFoundof 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Β§
- Pending
Pids π - The pending PIDs with the number of their marks, see
PendingPid.