X-Spam-Check-By: sourceware.org
Date: Sat, 3 Jun 2006 23:32:37 +0300
Message-Id: <200606032032.k53KWb1J008352@beta.mvs.co.il>
From: "Ehud Karni" <ehud@unix.mvs.co.il>
To: mwoehlke@tibco.com
Cc: cygwin@cygwin.com
Subject: Re: window resizing not updating COLUMNS and LINES
In-reply-to: <e5l9uc$chq$1@sea.gmane.org> (message from mwoehlke on Wed, 31 	May 2006 18:47:24 -0500)
Reply-to: ehud@unix.mvs.co.il
References: <004501c684ea$9aeb3f80$be32000a@idirect.net> <e5l4p3$uh8$1@sea.gmane.org> <20060531223424.GB8176@bouh.residence.ens-lyon.fr> <e5l9uc$chq$1@sea.gmane.org>
X-Mailer: Emacs 21.3.1 rmail (send-msg 1.108)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-8-i
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On  Wed, 31 May 2006 18:47:24 -0500, mwoehlke wrote:
> >
> > 'export COLUMNS' is needed for 'printenv COLUMNS' to work,
> > since in the printenv case you need the variable to be
> > transferred to the child printenv process.
>
> Ok, that makes sense, although my understanding is that if the child
> process is 'bash' (including a script run by bash), then it will have a
> non-exported copy of the var set correctly. Or rather, it would/should
> if this was working at all.

Here is my finding with cygwin1.dll 1.5.18, bash 3.00.16(11), rxvt v2.7.10

********** note: cygwin1.dll 1.5.18 (OLD) **********

# uname -a
CYGWIN_NT-5.1 p4-1700-xp 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown Cygwin

# echo $LINES $COLUMNS

# export LINES COLUMNS
# echo $LINES $COLUMNS

# stty -a
speed 38400 baud; rows 49; columns 105; line = 0;  .....

========== [ change of rxvt screen size by the mouse ] ==========

# echo $LINES $COLUMNS
47 105
# stty -a
speed 38400 baud; rows 47; columns 105; line = 0;  .....

========== [ change of rxvt screen size by the mouse ] ==========

# echo $LINES $COLUMNS
49 91
# stty -a
speed 38400 baud; rows 49; columns 91; line = 0;  .....


I get the exact same results with xterm 6.8.2.0(202).


My conclusions:

Both rxvt and xterm do their job properly.

The export is not needed (LINES and COLUMNS are local variables).
The stty does not set these vars. (both tested separately, not shown).

The bash variables are not set until the window change size
(until bash gets the SIGWINCH signal ? ).

Since it seems to work fine (almost), I guess the problem is with
cygwin1.dll 1.5.19.

Ehud.

BTW. On linux (locally compiled bash) the LINES & COLUMNS are set
     even before changing window size.



--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry

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

