Improve description of EXIT CODES. Based on the following OpenBSD commit,

forwarded by jmc@openbsd:
----------------------------
revision 1.14
date: 2007/05/20 23:15:57;  author: jmc;  state: Exp;  lines: +19 -18
rewrite DIAGNOSTICS to avoid confusion about which application returns
what, and when;

started by Jeffrey 'jf' Lim, with some correction from Ingo Schwarze;
ok otto
----------------------------
This commit is contained in:
wiz 2007-06-08 18:20:42 +00:00
parent b4c4f977e0
commit cce3a1d216

38
usr.bin/env/env.1 vendored
View File

@ -1,4 +1,4 @@
.\" $NetBSD: env.1,v 1.11 2003/08/07 11:13:35 agc Exp $
.\" $NetBSD: env.1,v 1.12 2007/06/08 18:20:42 wiz Exp $
.\"
.\" Copyright (c) 1980, 1990 The Regents of the University of California.
.\" All rights reserved.
@ -30,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)printenv.1 6.7 (Berkeley) 7/28/91
.\" $NetBSD: env.1,v 1.11 2003/08/07 11:13:35 agc Exp $
.\" $NetBSD: env.1,v 1.12 2007/06/08 18:20:42 wiz Exp $
.\"
.Dd August 27, 1993
.Dd June 8, 2007
.Dt ENV 1
.Os
.Sh NAME
@ -75,30 +75,30 @@ of the variables in the environment, with one
.Ar name=value
pair per line.
.Sh EXIT STATUS
If the
.Ar utility
is invoked, the exit status of
.Nm
shall be the exit status of
.Ar utility ;
otherwise, the
.Nm
utility exits with one of the following values:
exits with one of the following values:
.Bl -tag -width Ds
.It 0
The
.Ar utility
was invoked and completed successfully.
In this case the exit code is returned by the utility itself, not
.Nm .
If no utility was specified, then
.Nm
utility completed successfully
.It 1-125
An error occurred in the
.Nm
utility.
completed successfully and returned the exit code itself.
.It 1
An invalid command line option was passed to
.Nm .
.It 1\-125
.Ar utility
was invoked, but failed in some way;
see its manual page for more information.
In this case the exit code is returned by the utility itself, not
.Nm .
.It 126
The utility specified by
.Ar utility
was found, but could not be invoked.
.It 127
The utility specified by
.Ar utility
could not be found.
.El