Skip to content

native: fix passing errno to parent after fork #17720

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

Merged
merged 1 commit into from
Oct 3, 2014

Conversation

ben0x539
Copy link
Contributor

@ben0x539 ben0x539 commented Oct 2, 2014

The bitshifts were wrong in that they invoked undefined behavior and
only passed the lower byte of the presumed-to-be-32bit errno value.
Apparently all actually possible values for errno happen to be easily
under 256, so this didn't cause any actual problems.

This commit fixes the bitshifts, but doesn't generalize to errno types
that aren't 32bit.

The bitshifts were wrong in that they invoked undefined behavior and
only passed the lower byte of the presumed-to-be-32bit errno value.
Apparently all actually possible values for errno happen to be easily
under 256, so this didn't cause any actual problems.

This commit fixes the bitshifts, but doesn't generalize to errno types
that aren't 32bit.
@rust-highfive
Copy link
Contributor

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 2, 2014
@bors bors merged commit af633ce into rust-lang:master Oct 3, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Jul 28, 2024
… r=Veykril

flip the naming of the doc comment to comment assist

I did this the wrong way around when I implemented these assists, so here is a quick fix for it
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Aug 1, 2024
… r=Veykril

flip the naming of the doc comment to comment assist

I did this the wrong way around when I implemented these assists, so here is a quick fix for it
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.

4 participants