Subject: Password prompts and SIGTSTP
To: None <>
From: Thomas Klausner <>
List: tech-userlevel
Date: 04/21/2001 17:53:13

While looking for a good example how to do it correctly, I was
unsuccessful in finding a single program that uses a password prompt
(the main criterion being that the input is not echoed back) and
reacts well to a <CTRL-Z fg> combination.

E.g. lock:
wiz@hiro:~> lock
[1]+  Stopped                 lock
wiz@hiro:~> fg


where password is the password that should have been hidden.
ssh does something similar (freessh too), skeyinit does too. passwd
and login ignore the signal and handles it only after getting the
complete password (which is an improvement, I guess).

Is a SIGCONT handler the right answer, or is the behaviour of passwd
and login fine?


Thomas Klausner -
The secret of life is honesty and fair dealing. If you can fake that,
you've got it made. -- Groucho Marx