Repository navigation
v3.3.0
Release 3.3.0 — BSD/macOS Compatibility and Poller Integration
Overview
This release introduces BSD/macOS compatibility for the asynchronous socket acceptor and event removal logic within the uvent core. It replaces Linux-specific accept4 and epoll_ctl with proper BSD/macOS equivalents using accept + fcntl and kqueue respectively.
Changes
-
async_accept()- Added fallback for platforms without
accept4(macOS, NetBSD, OpenBSD). - Implemented
accept()+fcntl(F_SETFL, O_NONBLOCK)+FD_CLOEXEC. - Added
SO_NOSIGPIPEto prevent unwanted SIGPIPE on macOS. - Preserved EINTR handling and unified error handling logic.
- Retained IPv4/IPv6 address propagation.
- Added fallback for platforms without
-
Poller backend
-
In KQueue replaced
epoll_ctl(..., EPOLL_CTL_DEL, ...)with alternative:EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, nullptr); kevent(kqueue_fd, &ev, 1, nullptr, 0, nullptr);
ensuring proper
kqueueevent removal for bothEVFILT_READandEVFILT_WRITE.
-
Impact
- Enables
uventto compile and operate correctly on BSD and macOS. - No behavioral changes on Linux.
- Improves portability and reliability across POSIX environments.
Testing
- Verified async accept/connect cycle on MacOS 15.6 (24G84) and FreeBSD 14.
- Confirmed non-blocking sockets and SIGPIPE suppression.
- Validated event deletion behavior under
kqueuewithout memory leaks or stale descriptors.