Cygwin 1.7-1 - non-blocking IO problem

Larry Hall (Cygwin Developers) lhall@cygwin.com
Mon Dec 28 14:18:00 GMT 2009


On 12/28/2009 08:03 AM, Uri Simchoni wrote:
> Hi,
>
> I'm porting an application to Cygwin (1.7-1) and have encountered a
> problem related to non-blocking IO. It appears that write to a socket blocks
> in non-blocking mode blocks. I've narrowed it down to the attached program.
>
> The program creates 2 socket pairs, then forks and communicates to the
> child through these pairs. The parent process writes 1MB then reads 1MB, and
> repeats that 10 times. The child waits a while, then starts writing 10MB
> while also reading from the other pair in a non-blocking fashion.
> - On Cygwin 1.7-1 it hangs - If I replace the socketpair() by a pipe() it
> works (it's possible  because I make a uni-directional use with each socket pair).
> - It seems that the problem also happens with TCP sockets. - On Linux it
> works with the socketpair() - On Cygwin 1.5.25 it also works (it hanged
> some of the times but I  believe it has to do with my installation)
>
> Please advise.

Wrong list.  Problem reports go to the main Cygwin list.
See <http://cygwin.com/lists.html>.


-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?



More information about the Cygwin-developers mailing list