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

Combined fixes for uv_spawn stdio mangling #309

Merged
merged 4 commits into from
Apr 10, 2015

Conversation

saghul
Copy link
Member

@saghul saghul commented Apr 7, 2015

This PR combines #224 (Sam's patch + my test) and #226 (alternate implementation by yours truly and a test).

R=@bnoordhuis
/cc @sam-github

@saghul
Copy link
Member Author

saghul commented Apr 7, 2015

/cc @sam-github

@saghul
Copy link
Member Author

saghul commented Apr 7, 2015

@saghul saghul added this to the 1.5.0 milestone Apr 10, 2015
@saghul
Copy link
Member Author

saghul commented Apr 10, 2015

@bnoordhuis thanks for the review, pushed a few fixups, can you PTAL?

@bnoordhuis
Copy link
Member

LGTM with a question.

@saghul
Copy link
Member Author

saghul commented Apr 10, 2015

@bnoordhuis added a couple more fixups, if you have no further comments I'll rebase and land later. Thanks Ben!

@bnoordhuis
Copy link
Member

LGTM. I would perhaps not assign the result of dup2 to fd on the off chance that dup2 has a bug but that's bordering on paranoid.

sam-github and others added 4 commits April 10, 2015 15:10
If a descriptor was being copied to an fd that *was not its current
value*, it should get closed after being copied. But the existing code
would close the fd, even when it no longer referred to the original
descriptor. Don't do this, only close fds that are not in the desired
range for the child process.

See nodejs/node#862

PR-URL: libuv#309
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
Alternative implementation (and test) to
libuv#226

Fixes: joyent/libuv#1084
PR-URL: libuv#309
Reviewed-By: Ben Noordhuis <[email protected]>
@saghul saghul merged commit 09cdc92 into libuv:v1.x Apr 10, 2015
@saghul
Copy link
Member Author

saghul commented Apr 10, 2015

The CI was as unhappy as before (https://jenkins-iojs.nodesource.com/view/libuv/job/libuv+any-pr+multi/78/) so I landed it.

I made a small change while landing: https://github.com/libuv/libuv/pull/309/files#diff-993e2d1f75ebf418adfbe81df8050a95R289 it's possible that we get a legit -1 there, so fcntl would fail with EBADF.

Thanks again for the review Ben!

@sam-github
Copy link
Contributor

@saghul Thanks for finishing this up, I wasn't able to dig myself out of my work pile far enough to finish this.

@saghul
Copy link
Member Author

saghul commented Apr 20, 2015

No problem Sam!
On Apr 20, 2015 19:51, "Sam Roberts" [email protected] wrote:

@saghul https://github.com/saghul Thanks for finishing this up, I
wasn't able to dig myself out of my work pile far enough to finish this.


Reply to this email directly or view it on GitHub
#309 (comment).

@saghul saghul deleted the process_fd_fixes branch May 26, 2015 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants