Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Message-ID: <00a901c0ca6c$244c1ae0$0200a8c0@lifelesswks> From: "Robert Collins" To: "Charles Wilson" Cc: , References: <3ADD0441 DOT 91F76FB6 AT ece DOT gatech DOT edu> <3ADE1FC1 DOT F0A10A89 AT cygnus DOT com> <3ADE640A DOT 34E88DCE AT ece DOT gatech DOT edu> <3AE040FC DOT 16BD67BC AT ece DOT gatech DOT edu> <3AE070F3 DOT 1C45633A AT cygnus DOT com> <20010420145228 DOT B25768 AT redhat DOT com> <3AE0894D DOT 5288FDF3 AT cygnus DOT com> <20010420152744 DOT A26175 AT redhat DOT com> <3AE0E6C9 DOT CFA716BF AT ece DOT gatech DOT edu> <3AE108A4 DOT C4C0E026 AT ece DOT gatech DOT edu> <008c01c0ca1a$e9dc4020$0200a8c0 AT lifelesswks> <3AE118DA DOT 7F7CB4D9 AT ece DOT gatech DOT edu> Subject: Re: vfscanf in newlib Date: Sun, 22 Apr 2001 00:05:36 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 21 Apr 2001 13:57:40.0400 (UTC) FILETIME=[0796AB00:01C0CA6B] ----- Original Message ----- From: "Charles Wilson" To: "Robert Collins" Cc: ; Sent: Saturday, April 21, 2001 3:21 PM Subject: Re: vfscanf in newlib > Robert Collins wrote: > > > > A __cursory__ conde read through gives me the impression that > > simultaneous calls with the same file may result in undefined results. > > > > buffer wise it should be ok, but don't use the same handle twice. I > > don't know that the SUS has to say about the _r function w.r.t. the file > > in use, but I would expect that two calls from two threads to one of the > > _r functions should result in one blocking until the other finishes > > scnaning, not them interleaving fread calls. > > > > I may be completely off-base here though. > > Maybe. I just discovered something -- which *MAY* be related to my > changes, or *MAY& be related to other changes. I've built three > cygwin1.dll's in the last two days. I'm looking at the original function that you are wrapping: I don't think your changes will make it worse, just that the _r functions may be reentrant, but not threadsafe. That may be an issue with increasing threaded applications on cygwin... I don't think this should stop the code going in, just that someone should go through that code carefully. Rob