Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14509
| Path | csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Lars Schneider <larsxschneider@gmail.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: exec/read -s bug? |
| Date | Sun, 19 Aug 2018 20:45:36 +0200 |
| Lines | 46 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.5297.1534704344.1292.bug-bash@gnu.org> (permalink) |
| References | <70D019FA-3393-404C-B689-20E499BC66B9@gmail.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | usenet.stanford.edu 1534704345 1087 208.118.235.17 (19 Aug 2018 18:45:45 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=n2eBHQO8f6xWwBPd/voDctP6hwZOl8m7SVIeIvyQG5Q=; b=U/w7EZ0VuwiUDaMVxZD4kcgjB9muWRjnj3YUAbwqt3b43YL5a/GyXyK7Hj2qq/jbIi O6WsxT5X/+LEUZ4Lvrwn6HQiE4mwUTHG+nyxf/vEEVdZPpyp8pAeJmzef+3G6Cc+EhtO TLooKy64uWZ8JTGi/lBowB4O6/DSgZUUpaFq/JtZa15opMO1YWupSA29y/X6ETdO4gnN ggobNQtxcHpCTpfbRWHDSeeJifXJCkVqz61H+DEnVzbFlRySjS7nWYexu+g+pcDtM1C5 dFJAUTu0rZMglHeCxh6ZVruKTTIGLXDzXdqX0kZfgYdCrTyL9SKvXvBVmNeZ/OlWIcIr E0YA== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=n2eBHQO8f6xWwBPd/voDctP6hwZOl8m7SVIeIvyQG5Q=; b=BR5G7hR3JO5qEGxgNvVL3uFos82iX+k+kMf4hz8S+gophyYc6WhE6CrejM+bGdynLc RvT0qyfF0JYIC3KpyHu/sPUC83MrpucOrK1NgVqhvMHUtL7LozPJUv6XaqWiMIKmybJJ p1YNkPjC9wHju9eQrLFEQCHolBxWUilhTMo0QMj6aCk00MtMxl9PrbddCz0KWpmOqkXH U/v4kAP/J8zK2zUHQxXTVI/JhqzUG3s3o2jcYa90i4Zbgloxd/pVGKl7TSlbuZIiy986 e32TBEVY7V8CTFBT+oZSdVhOrUtQO+RbexYqzEI/VOBjDV5iXkqpmWsZM3qqq3qHdg+G Z/KA== |
| X-Gm-Message-State | AOUpUlE57kABWyTRelK9IqGAuAtFPpU/m1fQro4PKIcDZOO+hy8AaRvW J0BKYRLvlLrVxbxVbG4WPGM9O05K |
| X-Google-Smtp-Source | AA+uWPzLQ1ZRQAYVo+gNqsdNr8d23M6s35sc4GiWsydlM89NSlmob4/2A16EKvOgEKCq1WKT2afRxQ== |
| X-Received | by 2002:a1c:7d58:: with SMTP id y85-v6mr23256533wmc.91.1534704338605; Sun, 19 Aug 2018 11:45:38 -0700 (PDT) |
| In-Reply-To | <70D019FA-3393-404C-B689-20E499BC66B9@gmail.com> |
| X-Mailer | Apple Mail (2.3445.9.1) |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2a00:1450:400c:c09::244 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:14509 |
Show key headers only | View raw
> On Aug 19, 2018, at 6:33 PM, Lars Schneider <larsxschneider@gmail.com> wrote:
>
> Hi,
>
> consider this script:
>
> #!/bin/bash
> [ "`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.
I did a mistake: The problem _was_ fixed with BASH 4.4.18.
Further testing revealed that it is fixed with 4.4. too but not in Bash-4.3 patch 46.
I think the following item in the release notes corresponds to the problem:
oo. Fixed a bug that caused bash to not clean up readline's state, including
the terminal settings, if it received a fatal signal while in a readline()
call (including `read -e' and `read -s').
Does anyone see a workaround to set the readline state properly
for older BASH versions?
Thanks,
Lars
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: exec/read -s bug? Lars Schneider <larsxschneider@gmail.com> - 2018-08-19 20:45 +0200
csiph-web