From: Richard M. Stallman Date: Thu, 13 Apr 1995 01:59:20 +0000 (+0000) Subject: Don't use error count as exit status. X-Git-Tag: fsf-origin~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3766de757b47cac4157eff94449ff476973185e7;p=thirdparty%2Fautoconf.git Don't use error count as exit status. --- diff --git a/doc/standards.texi b/doc/standards.texi index d7cb596fb..ecf54b77b 100644 --- a/doc/standards.texi +++ b/doc/standards.texi @@ -1059,6 +1059,11 @@ comments in the source. The relevant data will be in variables, which are easy to examine with the debugger, so there is no point moving them elsewhere. +Do not use a count of errors as the exit status for a program. +@emph{That does not work}, because exit status values are limited to 8 +bits (0 through 255). A single run of the program might have 256 +errors; if you try to return 256 as the exit status, the parent process +will see 0 as the status, and it will appear that the program succeeded. @node Errors @chapter Formatting Error Messages diff --git a/standards.texi b/standards.texi index d7cb596fb..ecf54b77b 100644 --- a/standards.texi +++ b/standards.texi @@ -1059,6 +1059,11 @@ comments in the source. The relevant data will be in variables, which are easy to examine with the debugger, so there is no point moving them elsewhere. +Do not use a count of errors as the exit status for a program. +@emph{That does not work}, because exit status values are limited to 8 +bits (0 through 255). A single run of the program might have 256 +errors; if you try to return 256 as the exit status, the parent process +will see 0 as the status, and it will appear that the program succeeded. @node Errors @chapter Formatting Error Messages