From d9379fd4f43dc7888d5fb82630ddd9b0bfa9e892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 26 May 2021 22:49:23 +0200 Subject: getpw: Handle SIGINT properly --- src/getpw | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/getpw b/src/getpw index 8115716..5416797 100755 --- a/src/getpw +++ b/src/getpw @@ -2,6 +2,8 @@ # getpw -- read password +trap 'stty echo; echo; exit 130' INT + printf 'Enter password: ' > /dev/tty stty -f /dev/tty -echo read PASSWORD < /dev/tty -- cgit v1.2.3