[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

exec/read -s bug?

From: Lars Schneider
Subject: exec/read -s bug?
Date: Sun, 19 Aug 2018 18:33:49 +0200


consider this script:

        [ "`whoami`" = "root" ] || {
          exec sudo -u root "$0" "$@"
        read -s -p "enter stuff: " stuff

If I run the script as normal user (not root!) and I abort the "read -s -p"
call with "ctrl-c", then my shell is still in silent mode.

I can consitently replicate that behavior on Ubuntu 14.04.5 LTS (Trusty) 
and BASH 4.3.11(1)-release (x86_64-pc-linux-gnu) as well as BASH 4.3.30.

I also installed BASH 4.4.18 from source and I can replicate the issue.

Can you replicate the issue? 
Is this a known issue?
Do you consider it a bug? 
How would you investigate that further? 
Do you see a workaround for the problem?

I briefly looked into the `builtins/exec.def` and `builtins/read.def` code
and my impression is that `exec` might mess with the `ttsave/ttyrestore` 


PS: Before I reached out on the bug bash mailing list I asked for help here:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]