Skip to content

Commit

Permalink
Merge pull request #79 from Youtirsin/sigterm
Browse files Browse the repository at this point in the history
  • Loading branch information
Burning1020 authored Sep 6, 2023
2 parents eb10f91 + 9676ae9 commit 117a271
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions wasm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,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])
.expect("new signal failed");
let signals = Signals::new([libc::SIGPIPE, libc::SIGCHLD]).expect("new signal failed");
handle_signals(signals).await;
});

Expand All @@ -57,9 +56,6 @@ async fn handle_signals(signals: Signals) {
let mut signals = signals.fuse();
while let Some(sig) = signals.next().await {
match sig {
libc::SIGTERM | 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 117a271

Please sign in to comment.