diff options
author | John Ankarström <john@ankarstrom.se> | 2021-05-26 22:49:23 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-05-26 22:49:23 +0200 |
commit | d9379fd4f43dc7888d5fb82630ddd9b0bfa9e892 (patch) | |
tree | 581602986de639120a9bfa2606a87502e39c5d8a | |
parent | 36b1de62c371746603ef0221103aa10787ae40b3 (diff) | |
download | mum-d9379fd4f43dc7888d5fb82630ddd9b0bfa9e892.tar.gz |
getpw: Handle SIGINT properly
-rwxr-xr-x | src/getpw | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |