From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29675 invoked by alias); 21 Dec 2014 04:16:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34026 Received: (qmail 16558 invoked from network); 21 Dec 2014 04:16:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=WwGxl/tkOo+3s5G3HbxMkeH9Thjj4mlbqhySyNvZNi8=; b=tF53rbYX4nsnuzQu3v+xr9EZ7eEoowHNS+b2vHhf222qrnhi17hFbi6x8X4zttnOMn oxo5tdEntox7lkKBe6U/toxMw2/T44jzKfrTMMt3us3N0NIBgLOr9HKVEG2MejLaX8kF QhPa9sdXlpC9S8ObcVwsMSm9MEyTkzZ7tnJgXZaP9E5S5YP6yLzBgLwmE0QBsJeEMW0E U/WIbsrderRCObwn7Dn+uES25PU2JP2KrRCbnP9wuc948eXkyHaMVvcOQKK+m81pnOGI q3K9//lfghkuE+M0OrcO4GoDwJtfUGCWy0u80thr7SmlqEvmKiytk6c+3FGjdvbpNRWi XmzQ== X-Received: by 10.68.217.231 with SMTP id pb7mr25193860pbc.124.1419135408034; Sat, 20 Dec 2014 20:16:48 -0800 (PST) MIME-Version: 1.0 From: Mehran Kholdi Date: Sat, 20 Dec 2014 23:16:07 -0500 Message-ID: Subject: read -e does not restore terminal settings correctly when interrupted if To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=047d7b2ede2fe25c1b050ab235b6 --047d7b2ede2fe25c1b050ab235b6 Content-Type: text/plain; charset=ISO-8859-1 Hi Zsh guys! There's a bug in bash that causes inconvenience for zsh users only, apparently. I don't know why it has been there for so long, given there is a patch for it already. Do you think there's a way to work around this in zsh instead? An excerpt from the original bug : Given the following script (test.sh) : > #!/bin/bash > cleanup() { :; } > trap cleanup 0 > read -e dummy > Run the script ('bash test.sh') *in ZSH* and when it waits for an > input, interrupt it with Ctrl-C. Your terminal is now messed-up. This can > be verified by running 'cat > -t' and pressing Enter. ^M will be printed instead of a newline and > password > prompts such as the one in sudo cannot be submitted by pressing Enter > anymore. Thanks a lot for the awesome zsh, -- Mehran --047d7b2ede2fe25c1b050ab235b6--