From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] 9term echo-disabling fix (for ssh, vncviewer)
Date: Fri, 18 Jun 2004 18:06:11 +0200 [thread overview]
Message-ID: <200406181606.i5IG6BW06986@zamenhof.cs.utwente.nl> (raw)
In-Reply-To: Your message of "Fri, 18 Jun 2004 17:04:24 +0200." <013a01c45545$8bf80c50$07fa7d50@SOMA>
> > - return (ttmode.c_lflag&(ICANON|ECHO));
> > + return (ttmode.c_lflag&(ICANON) && ttmode.c_lflag&(ECHO));
>
> that's weird. 1st returns either:
>
> ICANON
> ECHO
> ICANON|ECHO
> 2nd returns 0 [raw | raw and no echo] or 1 [not raw and echo].
the return value is interpreted as boolean,
as in your ttyechoing routine (thanks for the pointer)
(but the != 0 test is omitted here).
for some reason (why? likely because matty's code did. why?)
we are not only looking at ECHO but also at ICANON .
Then, we must be careful to correctly deal with the case
where we have [icanon and no echo] which is what
ssh and vncviewer use when prompting for a password
(shows up as: israw c- in the debug 9term output)
The above seems to do the right thing in that case.
The original would interpret [icanon] as a reason
to echo, which is incorrect (or at least, does not
hide the password that is typed).
However, I guess with the above 9term does the wrong
thing in the case where we have [no icanon and echo],
because also then it does not echo.
However, I'm less concerned about that.
However, I'm the first to admit I know very little about termio(s).
Axel.
next prev parent reply other threads:[~2004-06-18 16:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-18 13:11 Axel Belinfante
2004-06-18 15:04 ` boyd, rounin
2004-06-18 16:06 ` Axel Belinfante [this message]
2004-06-18 16:52 ` boyd, rounin
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=200406181606.i5IG6BW06986@zamenhof.cs.utwente.nl \
--to=axel.belinfante@cs.utwente.nl \
--cc=9fans@cse.psu.edu \
/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.
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).