]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Don't use error count as exit status.
authorRichard M. Stallman <rms@gnu.org>
Thu, 13 Apr 1995 01:59:20 +0000 (01:59 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 13 Apr 1995 01:59:20 +0000 (01:59 +0000)
doc/standards.texi
standards.texi

index d7cb596fba8c31010bd00241814f0d67ae478419..ecf54b77bb4b3f8bc95c13fb89135c90d7637508 100644 (file)
@@ -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
index d7cb596fba8c31010bd00241814f0d67ae478419..ecf54b77bb4b3f8bc95c13fb89135c90d7637508 100644 (file)
@@ -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