From d261e7bd040050d4f79ea9ace53653c4a0f0b78a Mon Sep 17 00:00:00 2001 From: Finomnis Date: Sat, 2 Dec 2023 21:51:35 +0100 Subject: [PATCH] Fix comments in signal handlers --- src/signal_handling.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/signal_handling.rs b/src/signal_handling.rs index 1842c3e..4a7ec1b 100644 --- a/src/signal_handling.rs +++ b/src/signal_handling.rs @@ -29,16 +29,15 @@ async fn wait_for_signal_impl() { let mut signal_shutdown = windows::ctrl_shutdown().unwrap(); tokio::select! { - _ = signal_c.recv() => tracing::debug!("Received CTRL_C_EVENT."), - _ = signal_break.recv() => tracing::debug!("Received CTRL_BREAK_EVENT."), - _ = signal_close.recv() => tracing::debug!("Received CTRL_CLOSE_EVENT."), - _ = signal_shutdown.recv() => tracing::debug!("Received CTRL_SHUTDOWN_EVENT."), + _ = signal_c.recv() => tracing::debug!("Received CTRL_C."), + _ = signal_break.recv() => tracing::debug!("Received CTRL_BREAK."), + _ = signal_close.recv() => tracing::debug!("Received CTRL_CLOSE."), + _ = signal_shutdown.recv() => tracing::debug!("Received CTRL_SHUTDOWN."), }; } -/// Registers Ctrl+C and SIGTERM handlers to cause a program shutdown. -/// Further, registers a custom panic handler to also initiate a shutdown. -/// Otherwise, a multi-threaded system would deadlock on panik. +/// Registers signal handlers and waits for a signal that +/// indicates a shutdown request. pub(crate) async fn wait_for_signal() { wait_for_signal_impl().await }