diff options
author | jilles <jilles@FreeBSD.org> | 2011-01-16 14:11:50 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-01-16 14:11:50 +0000 |
commit | 48fcfccda6405238892c09615508b445ad1450cd (patch) | |
tree | ab145e4b43748ea90b0e8eee6adaa150bcffb29e /bin | |
parent | 3967e15d578a2539a47faa095aceabb2aa7fee9b (diff) | |
download | FreeBSD-src-48fcfccda6405238892c09615508b445ad1450cd.zip FreeBSD-src-48fcfccda6405238892c09615508b445ad1450cd.tar.gz |
sh(1): Document changes to 'exit' from traps.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/sh.1 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 275c5e2..32b76c8 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd December 21, 2010 +.Dd January 16, 2011 .Dt SH 1 .Os .Sh NAME @@ -1848,7 +1848,12 @@ If .Ar exitstatus is given it is used as the exit status of the shell; -otherwise the exit status of the preceding command is used. +otherwise, if the shell is executing an +.Cm EXIT +trap, the exit status of the last command before the trap is used; +if the shell is executing a trap for a signal, +the shell exits by resending the signal to itself; +otherwise, the exit status of the preceding command is used. The exit status should be an integer between 0 and 255. .It Ic export Ar name ... .It Ic export Op Fl p |