aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGiorgos Keramidas <keramida@FreeBSD.org>2005-03-04 12:40:07 +0000
committerGiorgos Keramidas <keramida@FreeBSD.org>2005-03-04 12:40:07 +0000
commit91ee1c5df645c2d35c9b4d509706f57b2e928045 (patch)
tree851b604839f291054c9619b97eafdcfbcef79eb2 /bin
parentf8d3af71cdde4e734c9bdd132ff3989886174931 (diff)
downloadsrc-91ee1c5df645c2d35c9b4d509706f57b2e928045.tar.gz
src-91ee1c5df645c2d35c9b4d509706f57b2e928045.zip
Add a section describing the exit status of the shell.
Obtained from: NetBSD
Notes
Notes: svn path=/head/; revision=143124
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/sh.18
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 862fd022b64d..0abec6ed4994 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -2043,6 +2043,14 @@ Similarly, the
.Dq Li set -E )
command can be used to enable a subset of
emacs-style command line editing features.
+.Sh EXIT STATUS
+Errors that are detected by the shell, such as a syntax error, will
+cause the shell to exit with a non-zero exit status.
+If the shell is not an interactive shell, the execution of the shell
+file will be aborted.
+Otherwise the shell will return the exit status of the last command
+executed, or if the exit builtin is used with a numeric argument, it
+will return the argument.
.Sh SEE ALSO
.Xr builtin 1 ,
.Xr echo 1 ,