X-Spam-Check-By: sourceware.org Date: Fri, 20 Jan 2006 11:27:56 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.5.19-2 fcntl invaild argument error changing socket blocking mode Message-ID: <20060120102756.GA6172@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20060119230848 DOT 41643 DOT qmail AT web30615 DOT mail DOT mud DOT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060119230848.41643.qmail@web30615.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Jan 19 18:08, Martin wrote: > I'm trying to compile TCL 8.4.12 using the 'unix' not > the 'win' target files. The target 'tclsh.exe' builds > ok with some modifications to various source files. > Now, I'm attempting to check the resulting build with > the TCL test suite. > Granted, there are numerous failures. > One failure in particular is somewhat bizarre. It > involves changing a socket from blocking mode, to > non-blocking mode and back to blocking. > > The attached test case illustrates this. Please excuse > the ugliness. > > Is anything obviously wrong, that explains this > behaviour. Not in your code. I have fixed this in Cygwin, even though I don't see why this was necessary. Each blocking send/recv is actually a nonblocking send/recv with WSAEventSelect handling. Each single call switches event handling on, calls recv or send, and switches event handling off again. Even though this seems to work correctly throughout, I still had to swtich off event handling explicitely right before calling ioctlsocket(FIONBIO). That's what my fix does now unconditionally. Thanks for the report and *especially* the simple testcase, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/