Expand description
Cooperative SIGINT/SIGTERM handling so active test workers are stopped and reaped
before cargo tmt exits.
Structs§
- Interrupted
- Error returned when execution stops due to SIGINT or SIGTERM.
Constants§
- INTERRUPT_
GRACE - Bounded grace period given to owned child process groups after SIGTERM on the first interrupt signal before escalating to SIGKILL.
Functions§
- check
- Returns
Err(Interrupted)if a SIGINT or SIGTERM has been received. - exit_
code - Process exit code corresponding to the first interrupting signal (
143for SIGTERM,130for SIGINT). - force_
kill_ requested - Returns true if a second (or subsequent) SIGINT/SIGTERM requested immediate SIGKILL escalation without waiting out the grace period.
- install
- Installs the process-wide SIGINT handler. Safe to call multiple times.
- is_
interrupted - Returns true once at least one SIGINT or SIGTERM has been received.
- is_
interrupted_ err - Returns true if
err(or any cause in its chain) isInterrupted. - signal_
name - Name of the first interrupting signal received (
"SIGTERM"or"SIGINT").