Skip to content

Support F_SETFL and F_GETFL #4119

Open
@tiif

Description

@tiif

This is proposed to support some tests in tokio.

Ideally we could support F_SETFL and F_GETFL for all kind of file descriptions, but getting them to work on socketpair should be sufficient to unblock some of the tests there (here is the relevant codepath).

F_GETFL is quite straight forward as we only support SOCK_NONBLOCK and SOCK_CLOEXEC flags for socketpair.

For F_SETFL, as it has the ability to change O_NONBLOCK flag, we need to decide what should happen if a previously blocking fd is marked as non-blocking, and there are waiting threads. Should they wake up immediately, later at some point or never? It might make this previously unreachable case, reachable.

Ideally support this on:

  • socketpair
  • pipe

@rustbot label +A-shims +C-enhancement +A-concurrency

Metadata

Metadata

Assignees

Labels

A-concurrencyArea: affects our concurrency (multi-thread) supportA-shimsArea: This affects the external function shimsC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions