Support F_SETFL
and F_GETFL
#4119
Labels
A-concurrency
Area: affects our concurrency (multi-thread) support
A-shims
Area: This affects the external function shims
C-enhancement
Category: a PR with an enhancement or an issue tracking an accepted enhancement
This is proposed to support some tests in tokio.
Ideally we could support
F_SETFL
andF_GETFL
for all kind of file descriptions, but getting them to work onsocketpair
should be sufficient to unblock some of the tests there (here is the relevant codepath).F_GETFL
is quite straight forward as we only supportSOCK_NONBLOCK
andSOCK_CLOEXEC
flags forsocketpair
.For
F_SETFL
, as it has the ability to changeO_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.@rustbot label +A-shims +C-enhancement +A-concurrency
The text was updated successfully, but these errors were encountered: