This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Tue, July 29, 2008 12:37 pm, Eric Blake wrote:
> -----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 <termios.h>.  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 $$

Hi Eric,

So, let me get this straight, you _don't_ want/need me to add the shopt
but you would like me to add the kill instruction?

J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]