X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: mwoehlke Subject: Re: window resizing not updating COLUMNS and LINES Date: Mon, 05 Jun 2006 11:32:56 -0500 Lines: 63 Message-ID: References: <004501c684ea$9aeb3f80$be32000a AT idirect DOT net> <20060531223424 DOT GB8176 AT bouh DOT residence DOT ens-lyon DOT fr> <200606032032 DOT k53KWb1J008352 AT beta DOT mvs DOT co DOT il> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 1.5.0.4 (X11/20060516) In-Reply-To: <200606032032.k53KWb1J008352@beta.mvs.co.il> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 Ehud Karni wrote: > 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. > [snip] > My conclusions: > > Both rxvt and xterm do their job properly. Hmm... then I guess Konsole (using ssh) is broken? Here is what I got from an SSH session using Konsole: $ stty -a | head -n 1 ; echo $LINES $COLUMNS speed 38400 baud; rows 71; columns 197; line = 0; (change the window size) $ stty -a | head -n 1 ; echo $LINES $COLUMNS speed 38400 baud; rows 69; columns 196; line = 0; (change the window size back) $ stty -a | head -n 1 ; echo $LINES $COLUMNS speed 38400 baud; rows 71; columns 197; line = 0; $ ...as you can see, in this instance they never worked at all. Seems there is an issue with bash being told to update these vars. It doesn't work when bash starts up, nor does it work when Konsole is resized, but apparently it works if rxvt/xterm is resized (I assume you are running both programs locally?). > The export is not needed (LINES and COLUMNS are local variables). > The stty does not set these vars. (both tested separately, not shown). Right. > 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. Yup, must be something like that. > BTW. On linux (locally compiled bash) the LINES & COLUMNS are set > even before changing window size. I tried (all testing done with Konsole): - local Linux box - remote Linux box via ssh - remote Solaris box via ssh - remote HP-UX box via telnet ...and all worked as expected. -- Matthew Lions and tigers and HIPPOS! Everyone needs a hippo! -- 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/