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

Use exec for the wrapper on UNIXes #38459

Merged
merged 1 commit into from
Dec 19, 2016
Merged

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Dec 18, 2016

This not only avoids the small – and unnecessary – constant overhead for each compiler invocation,
but also helps somewhat by only having “correct” rustc processes to look for in /proc/.

This also makes the wrapper behave effectively as a regular exec wrapper its intended to be.

I also took liberty to change the fallback error code from 1 to 0xfe (now only relevant on windows) so that when people complain about “compiler exited with code 254”, its obvious where the issue lies (wrapper losing the exit code somehow).

r? @alexcrichton

This not only avoids the small – and unnecessary – constant overhead for each compiler invocation,
but also helps somewhat by only having “correct” rustc processes to look for in `/proc/`.

This also makes the wrapper behave effectively as a regular exec wrapper its intended to be.
@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Dec 18, 2016

📌 Commit b3b2f1b has been approved by alexcrichton

sanxiyn added a commit to sanxiyn/rust that referenced this pull request Dec 19, 2016
Use exec for the wrapper on UNIXes

This not only avoids the small – and unnecessary – constant overhead for each compiler invocation,
but also helps somewhat by only having “correct” rustc processes to look for in `/proc/`.

This also makes the wrapper behave effectively as a regular exec wrapper its intended to be.

I also took liberty to change the fallback error code from `1` to `0xfe` (now only relevant on windows) so that when people complain about “compiler exited with code 254”, its obvious where the issue lies (wrapper losing the exit code somehow).

r? @alexcrichton
bors added a commit that referenced this pull request Dec 19, 2016
Rollup of 9 pull requests

- Successful merges: #38334, #38397, #38413, #38421, #38422, #38433, #38438, #38445, #38459
- Failed merges:
@bors bors merged commit b3b2f1b into rust-lang:master Dec 19, 2016
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