Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Nov 2001 11:22:13 +0200
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        "Gary W. Swearingen" <swear@blarg.net>
Cc:        setantae <setantae@submonkey.net>, FreeBSD-gnats-submit@FreeBSD.ORG, doc@FreeBSD.ORG
Subject:   Re: docs/32082: true.1 totally incorrect
Message-ID:  <20011120112213.B77582@sunbay.com>
In-Reply-To: <g6vgg631o5.gg6@localhost.localdomain>
References:  <E165YJb-000EfO-00@rhadamanth.private.submonkey.net> <d38zd3493u.zd3@localhost.localdomain> <20011119112558.GA65070@rhadamanth> <g6vgg631o5.gg6@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 19, 2001 at 01:12:42PM -0800, Gary W. Swearingen wrote:
> I think "true" and "false" should not bother with DIAGNOSTIC sections,
> but if used they should match the description's terminology and sense.
> 
I agree.

> All of "exit code", "exit status", "status" are in common use ("exit
> value", less so), but in the "sh", "ksh", and "csh" man pages "exit
> code" is used only in "sh" and there only in two adjacent sentences.
> 
It is also used in the sysexits(3) manpage.

> Selection of "status" or "exit status" is more context dependent and a
> matter of taste.  (I would try to avoid using "code", even though that
> is more natural to me than "status" because of my personal experience.)
> 
Irrelevant.

> It's debatable whether the status of "false" should be given as "one" or
> "non-zero".  Should man pages describe the actual program or the presumed
> specification of the program?  What specification should be presumed in
> this case?
> 
These manpages clain the conformance to POSIX, and POSIX says false(1)
should always return with a non-zero exit code, hence we should use
"non-zero".

> The shell man pages sometimes say that a command
> returns "one" when "non-zero" would seem to suffice.  (I think man pages
> should describe presumed specifications, but in this case I think the
> specification should be that "false" should exit with status = "1".)
> 
Nope.

> Which brings up another issue.  Is an exit status code value an integer
> or a string and should they be given as numerics or English words?
> 
It's definitely an integer.  :-)

> (I guess I'd wimp out and say that people should be expected to deal with
> the small confusion and allow both forms but recommend English words in
> most contexts as demanded by standard rules of English for readability.)
> 
Yes, both forms are allowed.

Finally, I suggest to commit the following:

Index: true/true.1
===================================================================
RCS file: /home/ncvs/src/usr.bin/true/true.1,v
retrieving revision 1.8
diff -u -p -r1.8 true.1
--- true/true.1	2001/07/15 08:01:38	1.8
+++ true/true.1	2001/11/20 09:09:35
@@ -46,17 +46,11 @@
 .Sh DESCRIPTION
 The
 .Nm
-command is normally used in a Bourne shell script.
-It tests for the appropriate status "false" before running
-(or failing to run) a list of commands.
+utility always returns with exit code zero.
 .Sh SEE ALSO
 .Xr csh 1 ,
 .Xr false 1 ,
 .Xr sh 1
-.Sh DIAGNOSTICS
-The
-.Nm
-utility always returns with exit code zero.
 .Sh STANDARDS
 The
 .Nm
Index: false/false.1
===================================================================
RCS file: /home/ncvs/src/usr.bin/false/false.1,v
retrieving revision 1.8
diff -u -p -r1.8 false.1
--- false/false.1	2001/07/15 08:01:13	1.8
+++ false/false.1	2001/11/20 09:09:35
@@ -46,13 +46,7 @@
 .Sh DESCRIPTION
 The
 .Nm
-command is usually used in a Bourne shell script.
-It tests for the appropriate status "false" before running
-(or failing to run) a list of commands.
-.Pp
-The
-.Nm
-utility always exits with a value other than zero.
+utility always returns with a non-zero exit code.
 .Sh SEE ALSO
 .Xr csh 1 ,
 .Xr sh 1 ,


Cheers,
-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011120112213.B77582>