Skip to main content

terminate_abandoned_zcashd

Function terminate_abandoned_zcashd 

Source
pub fn terminate_abandoned_zcashd(shutdown_grace_period: Duration)
Expand description

Terminates a supervised zcashd child that the supervisor task never got to shut down, blocking the calling thread.

On SIGINT/SIGTERM, the tokio runtime cancels the supervisor task without polling it again, so its graceful-shutdown path never runs and the child (spawned without kill_on_drop) is orphaned. Call this after the runtime has shut down: it sends SIGTERM, waits up to shutdown_grace_period for the child to exit, and SIGKILLs it as a last resort — the same sequence as the supervisor’s own terminate_child.

Does nothing when no supervised child is running, or on non-Unix targets (managed zcashd is only supported on Linux).