[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #5762 [Tor Client]: SOCK_CLOEXEC should get ENOSYS, not EINVAL, on accept()
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs