Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
"accept()" is not supported #8
Conversation
azat
added some commits
Apr 30, 2012
|
It looks like this change would be better made in evutil_accept4_(), and the code should have it fall back to accept() rather than failing entirely. Have a look at branch 21_accept4_enosys in the nmathewson/libevent github repository? |
|
@nmathewson yes it fix |
|
If evutil_accept4_() fails, it will return a negative value, so new_fd will be less than 0, so the code Am I missing something? |
|
Yes, this is event is retrying to read again after error, it means that this callback called again after error So commit like this azat/libevent@2be0338 doesn`t helps me Your patch is needed too |
|
In fact that commit (first in this pull request) is written because of my inattention |
|
But with the patch I wrote, ENOSYS can't occur, since if accept4() returns ENOSYS, the evutil_accept4_ function will immediately try accept(). So detecting ENOSYS in listener.c should be unnecessary, unless accept() can also return ENOSYS. Is there some other error you're thinking of here? |
|
Sorry, my mistake. You right |
azat commentedApr 30, 2012
If errno is ENOSYS - just return from loop
As the man a
accept(2)says: