CFFileDescriptor changes between 10.6.4 and 10.6.6
CFFileDescriptor changes between 10.6.4 and 10.6.6
- Subject: CFFileDescriptor changes between 10.6.4 and 10.6.6
- From: "A.M." <email@hidden>
- Date: Thu, 17 Mar 2011 17:06:36 -0400
Hello,
I had previously successfully used CFFileDescriptor to receive notifications on writes to an in-process pipe in 10.6.0-10.6.4. After upgrading to 10.6.6, I receive one notification and then no more (and yes, I re-enable the callback for read events).
I believe CFFileDescriptor previously used pthread and a separate kqueue for each monitored file descriptor but now libdispatch is used and I would like to better understand how this change affected my application.
In my case, the pipe's readable fd is added to my own kqueue and to the main NSRunLoop via the CFFileDescriptor (so that events implied by pipe activity can be serviced on whichever thread is available).
On 10.6.6, the CFFileDescriptor gets called once and then never again- the same code worked reliably under 10.6.4 and older versions. The symptoms seem to be a reaction to the same fd in multiple kqueues- at least that's my best guess.
My solution was to use libdispatch and trash CFFileDescriptor on 10.6. This indicates that the bug must be in the file descriptor handling within CFFileDescriptor itself. (I did confirm that the fd is not close()'d.)
I am curious if anyone has seen similar problems with CFFileDescriptor.
Cheers,
M _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden