Long running process not ended on SIGINT, Rust 1.66+ (Mac M1 Ventura?) #249
Description
Hi!
I'd like to report what appears to be an issue with cargo-watch
version 8.3.0 installed with Rust version 1.66+.
It seems that long running processes created by the binary are not terminated when receiving an interruption or termination signal. (Tested on a MacBook Pro M1 with Ventura 13.1)
I have created a repo to reproduce the error: MathieuTricoire/cargo-watch-signal-issue but any long running process should do the job.
For your information, it works fine with Rust 1.65, so maybe it's related to changes in Rust 1.66. I have no idea but maybe the following pull request could be relevant: rust-lang/rust#101077
Changelog: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1660-2022-12-15
Steps to reproduce the issue
Install cargo-watch
with Rust 1.66+ toolchain:
cargo +1.66 install --force cargo-watch
Launch the cargo-watch
command:
cargo watch --debug -x run
Stop the process (either with ctrl-c on the ongoing cargo-watch
process or pkill -SIGTERM cargo-watch
)
You can see that the signal has been sent according to the logs DEBUG - Sending signal SIGTERM to process group id=1234
but the processes in group 1234
have not been terminated.
Thank you for your help.