Skip to content

Conversation

@Susurrus
Copy link
Contributor

The default close() on OS X does not provide clear errors, instead the $NOCANCEL variants should be used. These are available as of OS X 10.6 onwards.

Fixes #595.

@Susurrus
Copy link
Contributor Author

I'm seeing failures on Mac like bad close function pointer: rust: 140735501702368 (0x7fff899614e0) != c 140735501707312 (0x7fff89962830), which I'm uncertain how I should fix. We aren't trying to point to close() on mac now, but the $NOCANCEL versions. How should I correct the tests for this?

@alexcrichton
Copy link
Member

Heh that's to be expected! It's ok to just add an exception for that as we're conciously expecting it to be different than the default close function.

The default  on OS X does not provide clear errors,
instead the NOCANCEL variants should be used. These are available
as of OS X 10.6 onwards.
@Susurrus
Copy link
Contributor Author

Alright, looks like this is good-to-go. @docbrown Any comments on this, since you originally discovered the issue. Maybe you wanna take a shot at this and confirm it fixes #595 as expected.

@docbrown
Copy link

@Susurrus I think you mean @DanielJoyce. :)

@Susurrus
Copy link
Contributor Author

@docbrown Sorry, you're right! Too many PRs going around!

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented May 19, 2017

📌 Commit 9b9f36a has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented May 19, 2017

⌛ Testing commit 9b9f36a with merge fda4049...

bors added a commit that referenced this pull request May 19, 2017
Use NOCANCEL variants for close on Mac

The default `close()` on OS X does not provide clear errors, instead the `$NOCANCEL` variants should be used. These are available as of OS X 10.6 onwards.

Fixes #595.
@bors
Copy link
Contributor

bors commented May 19, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing fda4049 to master...

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.

plain libc close(fd) is unreliable on MacOSX

4 participants