From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: crashes when setting COLUMNS=0 or 1
Date: Tue, 26 Jun 2012 00:30:42 -0700 [thread overview]
Message-ID: <120626003042.ZM19270@torch.brasslantern.com> (raw)
In-Reply-To: <120626000311.ZM19019@torch.brasslantern.com>
On Jun 26, 12:03am, Bart Schaefer wrote:
}
} In recent version adjustcolumns() has this:
}
} #ifdef TIOCGWINSZ
} if (signalled || zterm_columns <= 0)
} zterm_columns = shttyinfo.winsize.ws_col;
} else
} shttyinfo.winsize.ws_col = zterm_columns;
} #endif /* TIOCGWINSZ */
} if (zterm_columns <= 0) {
} DPUTS(signalled, "BUG: Impossible TIOCGWINSZ cols");
} zterm_columns = tccolumns > 0 ? tccolumns : 80;
} }
}
} This is called from adjustwinsize()
So, interesting side-effect: If my patch for IPDEF5 is applied, then
settings of COLUMNS and LINES get propagated through to the tty driver
and can end up affecting the behavior of the parent shell (or anything
else that's using the terminal where those values were changed), even
after the shell where the assignments were made has exited.
E.g. (COLUMNS=20) in a subshell will change the tty driver which will
signal the parent shell which will pick up the change and set its own
column width to 20. This is the only case I can think of where a
parameter assigned in a subshell can behave this way.
So we might want to consider carefully whether this is something we want
to inject only days before a 5.0.0 release ... but we should still fix
the crash somehow, so maybe there's a corresponding change needed in
some other place.
next prev parent reply other threads:[~2012-06-26 7:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 10:36 Mikael Magnusson
2012-06-26 3:38 ` Geoff Wing
2012-06-26 7:03 ` Bart Schaefer
2012-06-26 7:21 ` Bart Schaefer
2012-06-26 7:30 ` Bart Schaefer [this message]
2012-06-26 9:33 ` Peter Stephenson
2012-06-26 14:26 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=120626003042.ZM19270@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).