From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29796 invoked by alias); 29 Jul 2008 11:37:37 -0000 Received: (qmail 29745 invoked by uid 22791); 29 Jul 2008 11:37:36 -0000 X-Spam-Check-By: sourceware.org Received: from qmta01.emeryville.ca.mail.comcast.net (HELO QMTA01.emeryville.ca.mail.comcast.net) (76.96.30.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jul 2008 11:37:10 +0000 Received: from OMTA13.emeryville.ca.mail.comcast.net ([76.96.30.52]) by QMTA01.emeryville.ca.mail.comcast.net with comcast id vn1z1Z00917UAYkA1nd9K8; Tue, 29 Jul 2008 11:37:09 +0000 Received: from [192.168.0.101] ([67.166.125.73]) by OMTA13.emeryville.ca.mail.comcast.net with comcast id vnd71Z00H1b8C2B8Znd83q; Tue, 29 Jul 2008 11:37:09 +0000 X-Authority-Analysis: v=1.0 c=1 a=m5lT_AzS5tUA:10 a=bDfn2dcLXvAA:10 a=xe8BsctaAAAA:8 a=WeZy5AuGm5n58TGyCnEA:9 a=isJU3NJH7pjkL5oFuEcA:9 a=ilIl23Vu-k7ZBBHrMrYtbC0obVcA:4 a=eDFNAWYWrCwA:10 a=rPt6xJ-oxjAA:10 Message-ID: <488F00EB.8080606@byu.net> Date: Tue, 29 Jul 2008 11:37:00 -0000 From: Eric Blake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin-apps@cygwin.com Subject: Re: base-[files|password] for 1.7 (was Re: Cygwin 1.7.0-20 (was Re: Cygwin 1.7.0-19 (was Re: New Cygwin 1.7.0-18 in release-2))) References: <20080717155516.GC5675@calimero.vinschen.de> <20080719141841.GN5675@calimero.vinschen.de> <20080722174237.GA25430@calimero.vinschen.de> <5f21cb61c3a7cb7ad2d02df11907792e.squirrel@mail.morrison.mine.nu> <20080728152750.GN29031@calimero.vinschen.de> In-Reply-To: <20080728152750.GN29031@calimero.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2008-07/txt/msg00161.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Corinna Vinschen on 7/28/2008 9:27 AM: |> # check the window size after each command and, if necessary, |> # update the values of LINES and COLUMNS. |> shopt -s checkwinsize |> |> would it work in cygwin? Also; | | Looks like bash on Cygwin doesn't set LINES and COLUMNS. Eric? Hmm. Right now, bash _does_ set LINES and COLUMNS (as shell variables, you have to export them for children to see), but only after the first SIGWINCH, or if you have 'shopt -s checkwinsize', after the first non-builtin-command (ie. if checkwinsize is set, bash does not check window size after builtins - how weird is that?). At any rate, I already have a cygwin-specific patch for the upstream bug that lib/sh/winsize.c forgot to include . And blindly setting checkwinsize seems like it would slow things down: since SIGWINCH works (I tested in both cmd and urxvt), there is no need to slow down bash to check window size after every single command, when only window size changes are necessary. checkwinsize is primarily for those platforms that lack SIGWINCH. At any rate, you've given me an idea. Add this to /etc/profile, and $LINES and $COLUMNS will be automatically populated for all users, regardless of whether they use 'shopt -s checkwinsize': kill -s WINCH $$ - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkiPAOsACgkQ84KuGfSFAYB4+wCgnKRhiE1P6r/mKrOeR0BabG2n LjsAnR6CQyVTjw6huQBbHXU8qn4GvNyX =yxl6 -----END PGP SIGNATURE-----