util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Stanislav Brabec <sbrabec@suse.cz>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH 3/3] agetty: Reload only if it is really needed
Date: Fri, 12 Oct 2018 10:36:26 +0200	[thread overview]
Message-ID: <20181012083626.chz7xq7642mj24xx@ws.net.home> (raw)
In-Reply-To: <ac83a915-5a73-c4ff-6d43-2fea33166754@suse.cz>

On Thu, Oct 11, 2018 at 09:37:07PM +0200, Stanislav Brabec wrote:
> Karel Zak wrote:
> > Can you retest the current master branch with my changes? I do not
> > expect any issue, but for sure...
> Works as expected.
> 
> There is one remaining issue:
> 
> Reload happens even if user already started to type logname. It is very
> uncomfortable

I thought about it too.

> and it can even lead to problems with login. I tried to
> fix that: Once any letter is already entered, reload will be blocked
> and postponed.
> 
> To fix this, we would need to disable reloads once any character was
> entered. It would require switch to character mode and custom handling
> of backspace. I am not sure, whether we want this.

We already had implementation based on character mode for the select()
and it was pretty fragile (see commit message 2a14beb4e9c6cdf4466993741d86e45dd57ddef3).

The problem was that the code tried to switch back to line mode within
get_logname() to manage control keys (del/backspace) by terminal. The
switch between the modes is really bad idea in time you read from the
terminal.

The character mode for all get_logname() is definitely good idea for
the reload issue, the question is how tricky will be to manage login
name string on terminal. You need to refresh all the output line on
del/backspace, etc.

Send patch ;-)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2018-10-12  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 17:26 [PATCH 3/3] agetty: Reload only if it is really needed Stanislav Brabec
2018-10-11 12:23 ` Karel Zak
2018-10-11 19:37   ` Stanislav Brabec
2018-10-12  8:36     ` Karel Zak [this message]

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=20181012083626.chz7xq7642mj24xx@ws.net.home \
    --to=kzak@redhat.com \
    --cc=sbrabec@suse.cz \
    --cc=util-linux@vger.kernel.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.
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).