Date: Sun, 10 Dec 1995 19:32:38 +0100 (MET) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-current@FreeBSD.org (FreeBSD-current users) Subject: getpass() and SIGINT Message-ID: <199512101832.TAA08377@uriah.heep.sax.de>
next in thread | raw e-mail | index | archive | help
Hi all
Somebody from the Linux camp was pointing me to this (mis)feature
of getpass(3):
/*
* note - blocking signals isn't necessarily the
* right thing, but we leave it for now.
*/
omask = sigblock(sigmask(SIGINT)|sigmask(SIGTSTP));
While i think that blocking SIGTSTP might not be the worst idea at
all, blocking SIGINT contradicts the principle of least surprise, in
that you can't interrupt a program that's requesting a password until
you finally entered a newline.
Unless somebody objects, i'm going to remove SIGINT from the above
line.
--
cheers, J"org
joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512101832.TAA08377>
