-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Empty arguments to processes aren't handled correctly on windows #16272
Comments
The appears to be different on windows for both libgreen and libnative. |
I believe this happens because the arguments end up being quoted for Windows. Simplest fix would be to drop empty arguments. Thoughts? |
(Alternatively, we could quote empty arguments on Unix.) |
I would expect the empty arguments to be passed through as significant argument position. I ran into this in cargo because It looks like to fix this we just need to alter this condition to see if the argument is 0-length, and if so we quote it. Libuv already does something similar. I'm investigating a fix for libgreen, it looks like it should be working... |
There was a bug in both libnative and libuv which prevented child processes from being spawned correctly on windows when one of the arguments was an empty string. The libuv bug has since been fixed upstream, and the libnative bug was fixed as part of this commit. When updating libuv, this also includes a fix for rust-lang#15149. Closes rust-lang#15149 Closes rust-lang#16272
There was a bug in both libnative and libuv which prevented child processes from being spawned correctly on windows when one of the arguments was an empty string. The libuv bug has since been fixed upstream, and the libnative bug was fixed as part of this commit. When updating libuv, this also includes a fix for #15149. Closes #15149 Closes #16272
For example, this program prints
"1\n3"
on unix, and"1\n2"
on windows:The text was updated successfully, but these errors were encountered: