delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/14/16:49:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: Mon, 14 Oct 2002 16:50:58 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: problem with "more" under cygwin-1.3.13-1
Message-ID: <20021014205058.GB26475@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1034626607 DOT 12467 DOT ezmlm AT cygwin DOT com> <20021014203019 DOT 85247 DOT qmail AT web20002 DOT mail DOT yahoo DOT com>
Mime-Version: 1.0
In-Reply-To: <20021014203019.85247.qmail@web20002.mail.yahoo.com>
User-Agent: Mutt/1.4i

On Mon, Oct 14, 2002 at 01:30:19PM -0700, Joshua Daniel Franklin wrote:
>>* Jeff Johnston:
>>>>"set | more" only the first page is shown, it does not display the
>>>>"More" prompt, and the bash prompt appears at the bottom.
>>
>>>Try 1.3.13-2 if you haven't already.
>>
>>I'm used 13-2 and I can confirm Jeff's report.  More seems to have
>>broken.
>
>I ported 'more' mainly for people that have never heard of 'less' or
>people with extremely small disk space looking to cut corners.  I'll
>take a look as soon as I can, but *please* anyone who can use 'less',
>do so.
>
>BTW, does anyone have any additional details about the failure?

I do.  I managed to duplicate the problem by trying to run it on NT 4.0.
The problem is that more assumes that it can read characters from fd 2
which seems a remarkably iffy assumption.  It uses read(2, ...) to
characters from the 'tty'.

1.3.13 added code to invalidate reading on file descriptors that are
open only for writing.  Cygwin had been opening all of the standard
descriptors "appropriately" so that fd 0 was opened only for reading, fd
1 was opened for writing, ditto fd 2.

So, I've changed the code in cygwin so that it opens all of the standard
file descriptors in read/write mode initially.  This seems to mimic linux.

A more, IMO, robust change for more would be to open /dev/tty for reading
and use that for character input.

cgf

--
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/

- Raw text -


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