http://bugs.winehq.org/show_bug.cgi?id=24101
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ken@codeweavers.com
--- Comment #36 from Ken Thomases ken@codeweavers.com 2010-09-22 10:05:17 CDT --- (In reply to comment #32)
On MacOSX the function wine_server_send_fd is not blocking, so when close(socketfd[1] ); is executed sometimes the server hasn't received the fd.
What do you mean that it's "not blocking"? How did you determine this?
If wine_server_send_fd() isn't operating as expected, that seems like a problem with possibly more serious and widespread ramifications. Moving the close() for this one case may not be solving the problem the right way.
Looking at the code, it certainly seems like the fd has been passed off to the kernel via the sendmsg() call before wine_server_send_fd() has returned. I suppose there could be a bug in the kernel such that the file object is not independent of the sending user process until it's been copied to the receiving process.