Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Authentication-Warning: makita.cygnus.com: keiths owned process doing -bs Date: Tue, 14 Aug 2001 13:16:59 -0700 (PDT) From: Keith Seitz To: Troy Noble cc: Roderick Groesbeek , Subject: RE: 1.3.2: Cygwin && UDP && O_NONBLOCK In-Reply-To: <8F23E55D511AD5119A6800D0B76FDDE1CA302A@cpex3.channelpoint.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 14 Aug 2001, Troy Noble wrote: > Unless I misunderstood entirely, I think you've found a bug. Ok, I see what has happened. The real assertion is that NONBLOCKING i/o on udp doesn't work, not that blocking i/o doesn't work. This confused me because the original poster wrote: [snip] flags = fcntl(sock, F_GETFL, 0); ret = fcntl(sock, F_SETFL, flags & ~O_NONBLOCK); [snip] This certainly forces the socket to blocking mode. Under Linux: ~ [root AT xml /tmp]# gcc -Wall -o server server.c [root AT xml /tmp]# ./server (ctrl + c) [root AT xml /tmp]# ~ (Nice blocking..) Under Cygwin: ~ Administrator AT PIGGY ~/cvsroot/blocktest $ gcc -Wall -o server server.c Administrator AT PIGGY ~/cvsroot/blocktest $ ./server.exe ret=0| recvfrom: Invalid argument len=-1| recvfrom: Invalid argument len=-1| As my program demonstrated, this certainly does work. However, as the original poster reports, NONBLOCKING i/o does NOT work. The call to recvfrom DOES appear to block. Sorry for the confusion. (Where's my diet coke?) :-) Keith -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/