We never really supported Solaris, we pretended it implemented epoll,
but it never did see https://github.com/tokio-rs/mio/issues/1152. As no
one ever committed to being a maintainer for the port I'm removing it
now with this commit.
Instead replace it with illumuos on the CI, which we do support (as it
supports epoll) and for which we do have maintainers.
Reporting Out-of-band (OOB) as readable it could leave applications open
to DoS attacks. However because Mio uses edge-triggers most applications
won't actually be effected.
Contains the work in the following commits:
* v0.7.8 20b7298fe0d3da04b965ec4a379db0247cd632be.
* v0.7.9 07bc32f27b4f2488de91a66cfd489eae97551635.
* v0.7.10 b7006d710821f1d6aa0d5a63948dc21b4433ddbf.
* v0.7.11 772c692150c711d7bdd72b5c6287072b8914e519.
* v0.7.12 7adfb75fdefe98e3b57438bafa36c09a85377777.
* v0.7.13 75f41fb304d299dfbc07679d15193e03273c4597.
The socket2 crate provide all the functionality and more. Furthermore
supporting all socket options is beyond the scope of Mio.
The easier migration is to the socket2 crate, using the Socket or
SockRef types.
The migration for Tokio is tracked in
https://github.com/tokio-rs/tokio/issues/4135.
Calls fcntl F_DUPFD_CLOEXEC expects two arguments; the command
(F_DUPFD_CLOEXEC) and an argument for the command. In this case an lower
bound for the resulting file descriptor. Because we didn't provide a
value it would take whatever value was left in the register from
whatever code used it before the system call.
This caused Waker::new to fail, see issue
https://github.com/tokio-rs/mio/issues/1497.
The close-on-exec flag (FD_CLOEXEC; see fcntl(2)) for the
duplicate descriptor created by dup(2) is off.
We can use fcntl + F_DUPFD_CLOEXEC to dup the epoll_fd to fix this
issue.
Fixes: tokio-rs/tokio#3809
Signed-off-by: Tim Zhang <tim@hyper.sh>
Moving the Overlapped fields to the start to make it easier to determine
the offsets and hopefully incur less breakage once external fields
change size.
Note that the Overlapped fields internally uses miow::Overlapped, which
in turn is a OVERLAPPED struct as found in the winapi crate and has a
stable layout (as defined by the Windows API).
This unbreaks the CI in another crates that use
`RUSTDOCFLAGS=--cfg=docsrs` to verify correctness of their own things. I
wonder why docs.rs itself does not fail on this though.
- Make sure that Filter and Flag types are defined. The sizes
for these kevent fields are the same as on FreeBSD and OpenBSD
- Don't define the NOTE_BACKGROUND EVFILT_TIMER flag. This flag
value is exclusive to Apple platforms.