From 3766de757b47cac4157eff94449ff476973185e7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Apr 1995 01:59:20 +0000 Subject: [PATCH] Don't use error count as exit status. --- doc/standards.texi | 5 +++++ standards.texi | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/doc/standards.texi b/doc/standards.texi index d7cb596f..ecf54b77 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 d7cb596f..ecf54b77 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