Re: accept syscall
Re: accept syscall
- Subject: Re: accept syscall
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Fri, 02 Aug 2013 17:26:54 +0100
On 2 Aug 2013, at 16:30, Marco Bambini <email@hidden> wrote:
> What is not clear to me is which action to perform in case of -1 … I mean should I just try again or should I abort current function?
You should check errno. If it's EINTR, loop back immediately. If it's EWOULDBLOCK and you're doing the accept in a non-blocking fashion, you can just ignore the error and wait for the next async connection indication. Otherwise it's a real error and you should report it accordingly.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden