-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
std.process: Do not kill process group 2 in unittest #10586
base: master
Are you sure you want to change the base?
Conversation
When passing a Pid object to tryWait(), its processId will be changed to Pid.terminated, which happens to be -2. Passing this value to kill() will kill the process group 2 on Posix systems. If you run the build and test suite using this process group, the test case will kill the entire build. Co-authored-by: Emanuele Rocca <ema@debian.org> Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de> Bug-Debian: https://bugs.debian.org/1089007
Thanks for your pull request and interest in making D better, @helmutg! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#10586" |
Thanks, but wouldn't it make more sense to have |
That is a very reasonable question. Thank you for the review. Is the What I am proposing here is a minimum viable solution that makes gcc build rather than fail its build. If changing |
No, I think it is designed to only kill child processes, created using other
Seems highly unlikely. The unittest in question seems to assume that
True. We can go forward with this change as well, though I would add a Let's see what other Phobos maintainers say as well. @schveiguy ? |
When passing a Pid object to tryWait(), its processId will be changed to Pid.terminated, which happens to be -2. Passing this value to kill() will kill the process group 2 on Posix systems. If you run the build and test suite using this process group, the test case will kill the entire build.
Bug-Debian: https://bugs.debian.org/1089007