Open
Description
Problem
I'm using bacon to run tests and when tests are restarted, bacon terminates the child (cargo test) process using SIGKILL. The problem is if the test doesn't terminate, the child process is not terminated.
NOTE, this is not bacon related but can be reproduced using cargo only.
#[test]
fn test() {
loop {
std::thread::sleep_ms(10_0000);
}
}
I can reproduce this on both MacOS and Linux.
Steps
- Create a main.rs with a test that hangs, see above
- pkill -9 cargo
- ps aux | grep
- You'll find that the child process is still running (
/home/frja/bacon-zombie/target/debug/deps/bacon_zombie-ab96b146d87eb3ef
)
Possible Solution(s)
Not sure if it's possible to link the spawned child process... process groups maybe?
Notes
No response
Version
cargo 1.83.0 (5ffbef321 2024-10-29)
release: 1.83.0
commit-hash: 5ffbef3211a8c378857905775a15c5b32a174d3b
commit-date: 2024-10-29
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Ubuntu 24.4.0 (noble) [64-bit]
cargo 1.83.0 (5ffbef321 2024-10-29)
release: 1.83.0
commit-hash: 5ffbef3211a8c378857905775a15c5b32a174d3b
commit-date: 2024-10-29
host: aarch64-apple-darwin
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.7.1 (sys:0.4.74+curl-8.9.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 15.1.1 [64-bit]
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status