[tor-bugs] #5762 [Tor Client]: SOCK_CLOEXEC should get ENOSYS, not EINVAL, on accept()
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Thu May 3 22:20:58 UTC 2012
#5762: SOCK_CLOEXEC should get ENOSYS, not EINVAL, on accept()
------------------------+---------------------------------------------------
Reporter: arma | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.3.x-final
Component: Tor Client | Version:
Keywords: | Parent:
Points: | Actualpoints:
------------------------+---------------------------------------------------
Comment(by nickm):
That's a tiny bit wrong. accept4 can give ENOSYS *or* EINVAL -- it gives
ENOSYS if the accept4 syscall isn't supported by the kernel, and gives
EINVAL if the syscall is present, but one the flags SOCK_CLOEXEC or
SOCK_NONBLOCK isn't supported.
So instead of changing that line to "if (errno != ENOSYS)", we should
technically change it to "if (errno != ENOSYS && errno != EINVAL)".
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5762#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list