zsh-users
 help / color / mirror / code / Atom feed
* Return value when SIGTSTP'ing
@ 2005-07-31 18:46 DervishD
  0 siblings, 0 replies; only message in thread
From: DervishD @ 2005-07-31 18:46 UTC (permalink / raw)
  To: Zsh Users

    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...


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-31 18:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-31 18:46 Return value when SIGTSTP'ing DervishD

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).