Skip to content

Conversation

Nashenas88
Copy link
Contributor

Fuchsia does not restrict the range of valid values for a file descriptor, so the previous change that marked -1 as an invalid file descriptor does not apply to fuchsia.

Fuchsia does not restrict the range of valid values for a file descriptor, so
the previous change that marked -1 as an invalid file descriptor does not
apply to fuchsia.
@rust-highfive
Copy link
Contributor

r? @cramertj

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 20, 2021
@Nashenas88
Copy link
Contributor Author

CC @tmandry

@tmandry
Copy link
Member

tmandry commented Jan 21, 2021

cc #74699 which introduced the niche at -1

I'll add that we'd like to support this and remove the special case if possible, but we have unit tests that fail the assertion currently.

Copy link
Member

@tmandry tmandry left a comment

Choose a reason for hiding this comment

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

Looks good after nit, above.

@abarth
Copy link

abarth commented Jan 21, 2021

Why is Fuchsia being treated as different from other POSIX-like operating systems in this regard? File descriptors work the same way on Fuchsia as they do on other POSIX-like operating systems.

@abarth
Copy link

abarth commented Jan 21, 2021

we have unit tests that fail the assertion currently.

Shouldn't we fix those unit tests rather than change rust-lang to be incorrect?

@Nashenas88
Copy link
Contributor Author

Closing since this was not needed. The fix was done on the fuchsia side at https://fuchsia-review.googlesource.com/c/fuchsia/+/473984.

@Nashenas88 Nashenas88 closed this Jan 22, 2021
@Nashenas88 Nashenas88 deleted the fix-fuchsia-fd branch January 22, 2021 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants