Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 1997 23:39:12 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        hackers@FreeBSD.ORG, jacques@wired.ctech.ac.za
Subject:   Re: values for exit()
Message-ID:  <199710172339.QAA08275@usr06.primenet.com>
In-Reply-To: <19971015215513.ZP41248@uriah.heep.sax.de> from "J Wunsch" at Oct 15, 97 09:55:13 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > >  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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710172339.QAA08275>