From 925b2e2354eaa5e592305f052279e01cd6e4559a Mon Sep 17 00:00:00 2001 From: Youtirsin Date: Tue, 5 Sep 2023 16:00:09 +0800 Subject: [PATCH] remove SIGINT and SIGTERM handling Signed-off-by: Youtirsin --- wasm/src/main.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/wasm/src/main.rs b/wasm/src/main.rs index c12ac6e8..d40caf20 100644 --- a/wasm/src/main.rs +++ b/wasm/src/main.rs @@ -43,7 +43,7 @@ mod wasmtime; async fn main() -> anyhow::Result<()> { env_logger::builder().format_timestamp_micros().init(); tokio::spawn(async move { - let signals = Signals::new([libc::SIGTERM, libc::SIGINT, libc::SIGPIPE, libc::SIGCHLD]) + let signals = Signals::new([libc::SIGPIPE, libc::SIGCHLD]) .expect("new signal failed"); handle_signals(signals).await; }); @@ -59,13 +59,6 @@ async fn handle_signals(signals: Signals) { let mut signals = signals.fuse(); while let Some(sig) = signals.next().await { match sig { - libc::SIGTERM => { - debug!("received {}", sig); - exit(sig); - } - libc::SIGINT => { - debug!("received {}", sig); - } libc::SIGCHLD => loop { // Note: see comment at the counterpart in synchronous/mod.rs for details. match wait::waitpid(Some(Pid::from_raw(-1)), Some(WaitPidFlag::WNOHANG)) {