-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
Previously, when Deno is in --watch mode, there was a problem with sigint signal handler (according to #30587) and that was solved. By this and my specific case I found an issue when OpenTelemetry mode is enabled. The Deno's signal handling stops working at all, no callbacks are reached. I tested just with SIGINT and SIGHUP likewise no one worked as expected. Thats the code to reproduce the issue:
// watch-error.ts
const ac = new AbortController();
Deno.addSignalListener("SIGINT", () => {
console.log("SIGINT");
setTimeout(() => ac.abort(), 1000);
});
Deno.addSignalListener("SIGHUP", () => {
console.log("SIGHUP");
});
Deno.serve({ signal: ac.signal }, () => new Response("Hello World"));And run with OTEL_DENO=true deno run -A --watch watch-error.ts.
I send the signals with btop tool and it works normal when the flag OTEL_DENO is missing. At first the CTRL+C in terminal don't working was the main issue but after a CTRL+C was unrecognized and I change some files the entire watching mode stucks trying to restarting the app then I need to send a SIGKILL to the process. One time at restarting with this issue it showed a blocking message and a timer implying that the "node_modules" or the process was locked but I'm not sure about the cause.
Version
deno 2.5.6 (stable, release, x86_64-unknown-linux-gnu)
v8 14.0.365.5-rusty
typescript 5.9.2