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
Kernel.system leaks ENV on JRuby + Windows #6654
Comments
How peculiar! This is not fixed by my open3 fixes, even though there was some env juggling in that PR.
Should be easy to fix. |
Reproducible on unix with -Xnative.enabled=false. |
Ah so the logic I fixed is good (the path RubyIO.popen3 calls, via ShellLauncher.popen3, now peels the env off before launching) but the Kernel.system path just does a blind merge of the requested env with the current one. Just need to remove that logic now. |
Will be fixed by #6655:
|
FYI this was not a regression... the env merge code appears to exist as far back as 1.7.0: 24031a9 It probably was not noticed before now because there are fewer users on Windows (and you would have to look for this to see it happening). |
Thanks for the report, @deivid-rodriguez! You are the first one to notice this in almost ten years! |
Thanks for the quick fix @headius! |
Take the following script:
On my Linux box it prints two blank lines on both CRuby and JRuby. However on Windows in prints two blank lines with CRuby, but a blank line followed by "true" on JRuby.
Expected Behavior
Two blank lines printed.
Actual Behavior
Second line prints "true" meaning that the FOO variable passed to the subprocess has leaked into the main process.
I see some process launching fixes on Windows scheduled for 9.2.18.0, so not sure if this might have already been fixed. If so, please close this and looking forward to the release :)
The text was updated successfully, but these errors were encountered: