zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Martijn Dekker <martijn@inlv.org>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [buglet] Ctrl+C and 'kill -s INT $$' should produce exit status 130
Date: Fri, 23 Sep 2016 06:08:45 +0000	[thread overview]
Message-ID: <20160923060845.GA24636@fujitsu.shahaf.local2> (raw)
In-Reply-To: <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.


  reply	other threads:[~2016-09-23  6:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 13:17 Martijn Dekker
2016-09-23  6:08 ` Daniel Shahaf [this message]
2016-09-25 17:56 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160923060845.GA24636@fujitsu.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=martijn@inlv.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).