Open
Description
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