zsh-users
 help / color / mirror / code / Atom feed
From: DervishD <zsh@dervishd.net>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: Return value when SIGTSTP'ing
Date: Sun, 31 Jul 2005 20:46:17 +0200	[thread overview]
Message-ID: <20050731184617.GA96@DervishD> (raw)

    Hi all :)

    When I hit ^Z to stop a process, the $? variable holds the value
19 or 20, depending on the program being stopped (that is, if the
program handles or not SIGTSTP, I suppose), instead of 128+19 and
128+20, as I assumed from the docs.

    Well, strictly speaking the process is not terminated, so maybe
the 128+signal number rule doesn't apply here, but since $? holds the
signal number, I think that it would be a good idea. I don't know
what POSIX specifies (or SUS), or what the other shells do, anyway.

    Is there any reason to set the exitcode to the signal number and
not 128+signal number instead?

    Thanks a lot in advance :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


                 reply	other threads:[~2005-07-31 18:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050731184617.GA96@DervishD \
    --to=zsh@dervishd.net \
    --cc=zsh-users@sunsite.dk \
    /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).