pub fn send_termination(
record: &PidRecord,
) -> Result<TerminationSignal, StopRefusal>Expand description
Send SIGTERM to record’s incarnation.
The caller MUST have verified the incarnation first
(incarnation::probe): this function signals the pid it is given, and
signalling an unverified pid is exactly what the stop verb exists to
prevent. Split out of [signal_and_wait] because aion server restart
needs the SIGNAL without the wait — it starts the successor while the
predecessor drains, which is what makes a restart a handover rather than
an outage.
§Errors
Returns StopRefusal::SignalFailed when the pid cannot be expressed as
a signal target or the kernel refuses the signal, and
StopRefusal::UnsupportedPlatform on a build without POSIX signals.