Skip to main content

Module signal

Module signal 

Source
Expand description

Deterministic signal handling: injectable signals under simulation.

Under simulation (simulation + cfg(madsim)), ctrl_c() responds to madsim::runtime::Handle::send_ctrl_c(node_id) from test code. Unix builds also expose SIGTERM; simulation and non-Unix builds never complete that future.

Functions§

ctrl_c
Completes when a “ctrl-c” notification is sent to the process.
terminate
Waits for SIGTERM on Unix builds.