-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Killing cargo test doesn't terminate the child process #14929
Comments
Hopefully a clearer example on how reproduce:
|
And finally (?), a huge thanks to everyone on the cargo team! What an amazing job you do! |
If you run From my understanding, on Linux killing parents doesn't automatically kill their children. Those orphan will just link to init process or something else. Not sure if we want cargo to be opinionated on process signal handling. To myself I would leave it to parent process of cargo. Any reason the command invoking |
I'm truly not an expert on the topic, but I guess the reason is that the code invoking cargo looks something like this:
Not sure how the above code could handle this better. Probably obvious, but the above program exhibits the the problem:
|
Some alternative testing frameworks like nextest have their own specific execution model, so they chose to handle signals all by themselves. See https://nexte.st/docs/design/architecture/signal-handling/. It is generally good if |
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.
I can reproduce this on both MacOS and Linux.
Steps
/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
The text was updated successfully, but these errors were encountered: