Opened 4 years ago

Last modified 4 years ago

#10367 new Bugs

kqueue on OSX broke support for read-only file descriptors

Reported by: alexander.afanasyev@… Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

Prior 1.56, we were successfully using boost::asio::posix::stream_descriptor with libpcap (file descriptor retrieved via pcap_get_selectable_fd).

My understanding, that change https_github.com_boostorg_asio_commit_660e9fe30204e0ada0d1fd40c48015810d2647dc (replace _ with /) required all file-descriptors to be both readable and writeable (e.g., register_descriptor always registers EVFILT_READ and EVFILT_WRITE events).

In the case of libpcap, the file descriptor only works in one direction (read) and attempt to register EVFILT_WRITE event results in assign: Invalid argument error.

Change History (1)

comment:1 Changed 4 years ago by Antony Polukhin

Component: Noneasio
Owner: set to chris_kohlhoff
Note: See TracTickets for help on using tickets.