I recently started learning Rust and tried to contribute to some projects that use it, specifically Andromeda and Deno. Both projects are JavaScript/TypeScript runtimes and have some problems with their watch mode.
This issue shows how the two runtimes behave differently. When using Node.js in watch mode, it handles the INT signal correctly, but Deno just exits without doing that. This can lead to some resources not being released properly. I plan to submit a pull request (PR) to fix this issue because I have worked on related PRs before.
I think the problem is that Deno doesn’t pass the INT signal to the process running the JavaScript/TypeScript code, so it just stops immediately.
I found some notes left by developers about three years ago while exploring the repo. While exit codes and signal handling aren’t the same, both should be managed properly for the JavaScript/Rust processes. I will keep trying to figure this out.
// TODO(bartlomieju): this function is not handling `exit_code` set by the runtime
// code properly.
async fn run_with_watch(
Top comments (0)