From owner-freebsd-doc Tue Nov 20 1:30:15 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B348837B41C for ; Tue, 20 Nov 2001 01:30:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAK9U1H23785; Tue, 20 Nov 2001 01:30:01 -0800 (PST) (envelope-from gnats) Date: Tue, 20 Nov 2001 01:30:01 -0800 (PST) Message-Id: <200111200930.fAK9U1H23785@freefall.freebsd.org> To: freebsd-doc@freebsd.org Cc: From: Ruslan Ermilov Subject: Re: docs/32082: true.1 totally incorrect Reply-To: Ruslan Ermilov Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR docs/32082; it has been noted by GNATS. From: Ruslan Ermilov To: "Gary W. Swearingen" Cc: setantae , FreeBSD-gnats-submit@FreeBSD.ORG, doc@FreeBSD.ORG Subject: Re: docs/32082: true.1 totally incorrect Date: Tue, 20 Nov 2001 11:22:13 +0200 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