Spurious recv() EAGAIN on OSX? -


Edit: The problem has been solved, I previously said fcntl (sock, F_SETFL, FDCLOEXEC) on server socket . It is mapped in some way to a mask that has O_Nblock, because FD_CLOEXEC is for F_SETFD, not F_SETFL and client sockets are inherited too.

Hello,

I'm developing a networking application on Mac OS X 10.4 Something strange is happening here: sometimes - a very regular and dependable - one on the blocked TCP socket RQV () gives Operation-1, which is set to ENNN.

It is very strange because, as mentioned, there is a blocked socket, nor have I fixed any time-duration - which can also cause an EAGAN return due to the Docks State. I use Walkcock () to verify that there is no timeout if I slipped into sleep () and call again (again), then I get the data right from the next data.

Has anyone ever encountered OSX on first or any other system first?

This application is very simple; it is single-threaded, does not take advantage of singles, no asynchronous I / O is not running.

man reads the page:

[EAGAIN] socket non -Account is marked, and the received work will be blocked, or the expiration was scheduled , and the timeout expired before data was received.

Note the "timeout" section.

Comments