From owner-freebsd-hackers Fri Oct 17 16:40:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA15617 for hackers-outgoing; Fri, 17 Oct 1997 16:40:14 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.5.85]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA15612 for ; Fri, 17 Oct 1997 16:40:10 -0700 (PDT) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.7/8.8.7) id QAA09206; Fri, 17 Oct 1997 16:39:27 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp04.primenet.com, id smtpd009202; Fri Oct 17 16:39:24 1997 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id QAA08275; Fri, 17 Oct 1997 16:39:12 -0700 (MST) From: Terry Lambert Message-Id: <199710172339.QAA08275@usr06.primenet.com> Subject: Re: values for exit() To: joerg_wunsch@uriah.heep.sax.de Date: Fri, 17 Oct 1997 23:39:12 +0000 (GMT) Cc: hackers@FreeBSD.ORG, jacques@wired.ctech.ac.za In-Reply-To: <19971015215513.ZP41248@uriah.heep.sax.de> from "J Wunsch" at Oct 15, 97 09:55:13 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > > Where can I find the exit values for > > > exit()? Meaning, what is the difference > > > between eg exit(1) and exit(2)? errno.h > > each application defines their return code meanings. The important > > rule is that 0 means no error, non-zero indicates an error or special > > condition. > > Not necessarily. style(9) encourages the use of the values as > documented in sysexits(3). In particular new stuff should better > stick to it. > > Of course, a utility that wishes to report just shell-script true/ > false values will do fine by only using 0 or 1 for the exit values. A number of shells actually report the text of the exit condition for a non-zero return. This allows them to internationalize error messages, and is more friendly for the user than the command just exiting with no message and no way to tell except "echo $?". Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.