Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] remove SIGTERM and SIGINT signal handling #79

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading