Skip to content

Commit

Permalink
remove SIGINT and SIGTERM handling
Browse files Browse the repository at this point in the history
Signed-off-by: Youtirsin <[email protected]>
  • Loading branch information
Youtirsin committed Sep 5, 2023
1 parent 8f6e1b5 commit 925b2e2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions wasm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand All @@ -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)) {
Expand Down

0 comments on commit 925b2e2

Please sign in to comment.