Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ut-sally.UUCP Path: utzoo!decvax!genrad!panda!talcott!harvard!seismo!ut-sally!jsq From: jsq@ut-sally.UUCP (John Quarterman) Newsgroups: mod.std.unix Subject: Re: standardized error messages (retransmitted) Message-ID: <2446@ut-sally.UUCP> Date: Tue, 23-Jul-85 13:43:34 EDT Article-I.D.: ut-sally.2446 Posted: Tue Jul 23 13:43:34 1985 Date-Received: Wed, 24-Jul-85 01:41:38 EDT References: <2391@ut-sally.UUCP> Reply-To: std-unix@ut-sally.UUCP Organization: U. Texas CS Dept., Austin, Texas Lines: 42 Approved: jsq@ut-sally.UUCP From: John Quarterman (moderator) Topic: standardizing exit codes It's not quite the same as standardized error messages, but close enough to keep in the same discussion. ---------------------------------------------------------------------- Date: Sat, 20 Jul 85 16:52:04 PDT From: seismo!sun!guy (Guy Harris) To: ut-sally!std-unix Subject: Standardizing exit codes There is currently no universal standard for the meaning of exit codes, except that 0 means "true" or "success" and non-zero means "false" or "failure". Some System V programs use 2 for syntax errors, failure to open files, and the like, and 1 for "the command was run properly but gives a result of 'false'". "delivermail" and "sendmail" expect programs they run to exit with an error code from the include file which has a number of exit codes which further break down "failure to execute properly" (like exit code 2 in those System V commands) into "incorrect usage", "input data incorrect", "input file could not be opened", etc.. It might be useful to adopt some convention like that of . Exit code 0 would mean "the command executed without problems and returns a 'true' result; exit codes from 1 to some number N1 - 1 would mean "the command executed without problems and returns a 'false' result" - the exit code could be used to further specify the type of "false" result, if desired; exit codes from N1 to 254 could mean "the command did not execute successfully" and the exit codes from could break this down further; and exit code 255 would be reserved for forked-off child processes which were supposed to "exec" something but the "exec" failed. (In , N1 has the value 64.) Guy Harris ------------------------------ Discussions-Of: UNIX standards, particularly the IEEE P1003 draft standard. Submissions-To: ut-sally!std-unix or std-unix@ut-sally.ARPA Comments-To: ut-sally!std-unix-request or std-unix-request@ut-sally.ARPA UUCP-Routes: {ihnp4,seismo,harvard,gatech}!ut-sally!std-unix Archives-In: ~ftp/pub/mod.std.unix on ut-sally.ARPA (soon sally.UTEXAS.EDU)