From owner-freebsd-hackers Wed Oct 15 13:24:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA24778 for hackers-outgoing; Wed, 15 Oct 1997 13:24:20 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id NAA24758 for ; Wed, 15 Oct 1997 13:24:14 -0700 (PDT) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id WAA05646; Wed, 15 Oct 1997 22:23:42 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id VAA13618; Wed, 15 Oct 1997 21:55:13 +0200 (MET DST) Message-ID: <19971015215513.ZP41248@uriah.heep.sax.de> Date: Wed, 15 Oct 1997 21:55:13 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: hackers@FreeBSD.ORG Cc: jacques@wired.ctech.ac.za Subject: Re: values for exit() References: <199710151654.LAA22736@plains.NoDak.edu> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199710151654.LAA22736@plains.NoDak.edu>; from Mark Tinguely on Oct 15, 1997 11:54:28 -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Mark Tinguely wrote: > > Where can I find the exit values for > > exit()? Meaning, what is the difference > > between eg exit(1) and exit(2)? > > 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. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)