summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-07-18 07:51:32 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-07-18 07:51:32 +0000
commit8445b707fdc441cdb45ccb423aa3dc9cb80571fc (patch)
tree479181f2721669c56ab12c1009c4630f9f6d6011 /doc
parent829fcc09917483a1db3cf496f7f822592e7e58c9 (diff)
downloadcoreutils-8445b707fdc441cdb45ccb423aa3dc9cb80571fc.tar.xz
(false invocation):
Mention that false is often built-in, and that it exits with status >1 on some hosts. (true invocation): Remove now-incorrect "non-POSIX mode" reference.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 6fd1cc20e..68e8e62c7 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -9577,6 +9577,9 @@ pipeline.
@command{false} does nothing except return an exit status of 1, meaning
@dfn{failure}. It can be used as a place holder in shell scripts
where an unsuccessful command is needed.
+In most modern shells, @command{false} is a built-in command, so when
+you use @samp{false} in a script, you're probably using the built-in
+command, not the one documented here.
@command{false} honors the @option{--help} and @option{--version} options.
@@ -9588,6 +9591,10 @@ Note that @command{false} (unlike all other programs documented herein)
exits unsuccessfully, even when invoked with
@option{--help} or @option{--version}.
+Portable programs should not assume that the exit status of
+@command{false} is 1, as it is greater than 1 on some
+non-@acronym{GNU} hosts.
+
@node true invocation
@section @command{true}: Do nothing, successfully
@@ -9609,8 +9616,8 @@ command, not the one documented here.
@command{true} honors the @option{--help} and @option{--version} options.
Note, however, that it is possible to cause @command{true}
-to exit with nonzero status: when invoked in non-@acronym{POSIX} mode,
-with the @option{--help} or @option{--version} option, and with standard
+to exit with nonzero status: with the @option{--help} or @option{--version}
+option, and with standard
output already closed or redirected to a file that evokes an I/O error.
For example, using a Bourne-compatible shell: