From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24722 invoked by alias); 23 Sep 2016 06:09:57 -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: 39422 Received: (qmail 21130 invoked from network); 23 Sep 2016 06:09:57 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.26):SA:0(0.0/5.0):. Processed in 0.120934 secs); 23 Sep 2016 06:09:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=pd+uVtBVHadwtGRMAL2VahmkEck=; b=gj5Kmz kmxEWDsxZQL3O+fmVjKdyV1rSWC+6StrNpwM+Xc6/Lldj6CWb/PJR4zw2UHLLNUQ UvMkLUhUNvbwF/eIUuxLkvJOHZqQ8qYsebDL5tiipQDIS0Z23nB0jgBvRshlQ6Qo W/nYoUo+vm3JfSrmDpuc4cOEd7iO2hsj9hki8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=pd+uVtBVHadwtGRMAL2VahmkEck=; b=WDf2+ Iao2ggdwb5tDjI9BQ0LQnwTqpLp3WvkbD5y/4V0NIt21NEaEUsmARR4xADdTFEv4 qQIHuO6pnXYV83bmf4WPArWwtIDXrQUCcL/WrpEjllpEohbJX6l3RFUaAxRGOZwq ZRrEOWfW9ZoOsPMjenk+EEItJy0Esv5DLUAJRo= X-Sasl-enc: 1reW7C56Xz52YjP/nVkrP8DtM+7Dv/xjXBeCZOu/q3mk 1474610993 Date: Fri, 23 Sep 2016 06:08:45 +0000 From: Daniel Shahaf To: Martijn Dekker Cc: Zsh hackers list Subject: Re: [buglet] Ctrl+C and 'kill -s INT $$' should produce exit status 130 Message-ID: <20160923060845.GA24636@fujitsu.shahaf.local2> References: <13e6db91-8ba9-8709-9708-5126ce882145@inlv.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <13e6db91-8ba9-8709-9708-5126ce882145@inlv.org> User-Agent: Mutt/1.5.23 (2014-03-12) Martijn Dekker wrote on Tue, Sep 20, 2016 at 14:17:08 +0100: > On an interactive shell, sending SIGINT to the shell (which could be > done with 'kill -s INT $$' or simply by pressing Ctrl+C) causes zsh to > return to the command prompt with an exit status of 0, which represents > a normal/successful exit. This should be 130, the exit status > corresponding to SIGINT (128+2). > > % while :; do :; done > ^C% > % echo $? # should produce 130 > 0 > % kill -s INT $$; echo oops # no output produced, as expected > % echo $? # should produce 130 > 0 What are the consequences of this? Does it cause anything besides the %? prompt escape, and printexitvalue, not reflecting the signal? It only happens for builtins: while =true; do =true; done gets it right but while true; do true; done does not.