« Good Food | Main | An evening gone sideways »

August 26, 2008

So frustrating...

I've been working on porting a sizable body of existing code to OS X of late, and the last week has been incredibly frustrating.

I've discovered that OS X (10.5.4) doesn't correctly support poll(2) on fifo's, and also doesn't support aio_read/aio_write to sockets, and doesn't document either limitation anywhere aside from the kernel source.

The poll issue was easy enough to work around, once I wasted time figuring out it didn't work, but the aio one looks to be harder.

And to add insult to injury, the misbehavior in poll goes against the POSIX spec, which says "The poll() function shall support regular files, terminal and pseudo-terminal devices, FIFOs, pipes, sockets and...") and the Apple man page is just plain wrong about aio_write/aio_read - the enqueue call for aio operations against a socket return EINVAL - but none of the three conditions listed on the man page are the cause.

Posted by dberger at August 26, 2008 6:11 PM

Comments

Post a comment




Remember Me?


Please enter the security code you see here

(you may use HTML tags for style)