Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Thu, 26 May 2005 21:19:44 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: connect()/cygwin_select() hangs in >=1.5.15 Message-ID: <20050526191944.GX22615@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20050526190807 DOT 76545 DOT qmail AT web31708 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: <20050526190807.76545.qmail@web31708.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2i On May 26 12:08, Sunil wrote: > this issue is not fixed in any later snapshots, not > even the just released 1.5.17. > > can someone with the knowledge of cygwin socket code > comment on it please? > > Thanks, > Sunil > > --- "Gerrit P. Haase" wrote: > > Sunil wrote: > > > > > This piece of code hangs with cygwin1.dll >=1.5.15 > > > during connect(), strace is attached. The same > > code > > > runs fine with cygwin1.dll version 1.5.13. > > > > > > -------------------------------- > > > fd = socket (proto->family, 1, > > > proto->stream_proto_num); > > > > > > if (fd < 0) { > > > ; > > > goto out; > > > } > > > > > > if (options & LINK_CONNECTION_NONBLOCKING) { > > > # 553 "linc-connection.c" > > > if (fcntl (fd, 4, 0x4000) < 0) > > > goto out; > > > > > > } > > > > > > if (fcntl (fd, 2, 1) < 0) > > > goto out; > > > > > > { long int __result; do __result = (long int) > > > (connect (fd, saddr, saddr_len)); while (__result > > == > > > -1L && (*__errno()) == 4); rv = __result; }; > > > # 596 "linc-connection.c" > > > if (rv && (*__errno()) != 119) > > > goto out; > > > > > > --------------------------- Can you please create a simple(!), short(!), stand-alone(!) testcase which builds OOTB(!) and uses the symbolic constants rather than numeric constants? Numbers as 4, 0x4000, 2, 1 in the context of fcntl don't make any sense at all. Neither does a socket(2) call with variables set to some unknown value. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/