delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
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 <keiths AT cygnus DOT com> |
To: | Troy Noble <troy DOT noble AT channelpoint DOT com> |
cc: | Roderick Groesbeek <rgroesb AT triple-it DOT com>, <cygwin AT cygwin DOT com> |
Subject: | RE: 1.3.2: Cygwin && UDP && O_NONBLOCK |
In-Reply-To: | <8F23E55D511AD5119A6800D0B76FDDE1CA302A@cpex3.channelpoint.com> |
Message-ID: | <Pine.GSO.4.33.0108141306010.23565-100000@makita.cygnus.com> |
MIME-Version: | 1.0 |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |