Skip to content
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

native, rustuv: Fix spawning with empty args #16284

Merged
merged 1 commit into from
Aug 12, 2014

Conversation

alexcrichton
Copy link
Member

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

@@ -479,7 +479,7 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String {
return cmd;

fn append_arg(cmd: &mut String, arg: &str) {
let quote = arg.chars().any(|c| c == ' ' || c == '\t');
let quote = arg.chars().any(|c| c == ' ' || c == '\t') || arg.len() == 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a comment, because it seems somewhat surprising? ("empty arguments on windows need to be explicitly quoted")

@huonw
Copy link
Member

huonw commented Aug 6, 2014

Travis failed in a way that looks like it may be relevant.

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
@alexcrichton
Copy link
Member Author

I think it should be better now, the test suite all passed locally at least.

bors added a commit that referenced this pull request Aug 12, 2014
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
@bors bors closed this Aug 12, 2014
@bors bors merged commit 3aec9f4 into rust-lang:master Aug 12, 2014
@alexcrichton alexcrichton deleted the issue-16272 branch August 16, 2014 05:18
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants