delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/12/14/13:47:25

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Message-ID: <019201c2a3a0$dca968e0$0201a8c0@sos>
From: "Sergey Okhapkin" <sos AT prospect DOT com DOT ru>
To: <cygwin-developers AT cygwin DOT com>
References: <20021214040532 DOT GA3368 AT redhat DOT com> <20021214175544 DOT N19104 AT cygbert DOT vinschen DOT de> <20021214180314 DOT GA11428 AT redhat DOT com>
Subject: Re: Changed fhandler_* read and raw_read methods throughout
Date: Sat, 14 Dec 2002 13:44:37 -0500
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Virus-Scanned: by amavisd-new

Looks like the binary compatibility is broken now...

E:\...src\i686-pc-cygwin\winsup\cygwin>nice ls
E:\usr\bin\ls.exe: *** fhandler size version mismatch detected - 0x6C/0x70.
You have multiple copies of cygwin1.dll on your system.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version
*should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.

Sergey Okhapkin
Somerset, NJ
----- Original Message -----
From: "Christopher Faylor" <cgf AT redhat DOT com>
To: <cygwin-developers AT cygwin DOT com>
Sent: Saturday, December 14, 2002 1:03 PM
Subject: Re: Changed fhandler_* read and raw_read methods throughout


> On Sat, Dec 14, 2002 at 05:55:44PM +0100, Corinna Vinschen wrote:
> >Hi Chris,
> >
> >On Fri, Dec 13, 2002 at 11:05:32PM -0500, Chris Faylor wrote:
> >> To accommodate my recent pipe changes, I've changed all of the
> >> fhandler_* read and raw_read methods.  I've changed them to void
> >> functions whose second parameter is both the length and the return
> >> value.
> >>
> >> I've done this so that if the ReadFile in raw_read succeeds but a
signal
> >> happens shortly thereafter, the number of bytes read will be available
> >> to the caller even though the thread which did the read has been
> >> terminated.
> >>
> >> It's possible that I got one of the many fhandler functions wrong when
I
> >> went through making this change so if you see odd behavior this is the
> >> place to check.
> >
> >your changes disable tcsh's ability to read script files correctly.
> >
> >AFAICS, you overoptimized the part looking for CRLF in
> >fhandler_base::read() by not writing the last character if it happens
> >not to be a \r.  This can only be observed when reading in O_TEXT mode.
>
> I can see why this would happen but I wonder how I missed this when I
> tested it.  Must have been tired.
>
> >Another point is the "else if (copied_chars <= 0)" stuff after the first
> >raw_read call.  As I understand that part, it actually should return
> >here if raw_read returned 0 or -1 and copied_chars is 0 as well.  Your
> >changes in the lines above don't copy the correct count of bytes read
> >back into copied_chars as the original code did so at this point, it
> >should now ask for the value of 'len' shouldn't it?  I attached a patch
> >for review.
>
> Thanks for the patch.  I ended up reorganizing this function YA so that
> it exits from the bottom.  There is also a possibility of dereferencing
> a pointer beyond the end of the passed in buffer, which still needed to
> be handled, AFAICT.
>
> I've checked in a new patch.  Does tcsh work now?
>
> Btw, there are still some problems with the pipe reader that I'm working
> on.  It is possible to get cygwin to block indefinitely on a pipe read
> when a pipe is opened in text mode.
>
> I sure do love text mode.  And Windows 95.
>
> Thanks for alerting me to this problem.
>
> cgf
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019