Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Regression: 'read -s' does not disable echo



On Wed, Jan 3, 2024 at 2:03 AM Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
>
> > On 02/01/2024 19:32 GMT Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > However, there may be a deeper problem:  gettyinfo() always reads the
> > state of the controlling TTY, but it's possible that "read -s" has
> > been called with input and output redirected from a different tty
> > device.
>
> I suggest we just document "don't do that".  That's definitely not
> something I think we ought to be playing with.

Well, that's just it.  With the isatty(0) test, we can be duped into
changing the state of the controlling TTY by directing input from a
different one.

So either "read -s" should ALWAYS read from SHTTY, or something more
involved is needed here.




Messages sorted by: Reverse Date, Date, Thread, Author