Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [buglet] Ctrl+C and 'kill -s INT $$' should produce exit status 130
- X-seq: zsh-workers 39422
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Martijn Dekker <martijn@xxxxxxxx>
- Subject: Re: [buglet] Ctrl+C and 'kill -s INT $$' should produce exit status 130
- Date: Fri, 23 Sep 2016 06:08:45 +0000
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- 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=
- In-reply-to: <13e6db91-8ba9-8709-9708-5126ce882145@inlv.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <13e6db91-8ba9-8709-9708-5126ce882145@inlv.org>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author