exit codes

Curtis Generous generous at dgis.daitc.mil
Fri Aug 18 22:56:23 AEST 1989


Has there ever been a consensus about what a `well-behaved` UN*X program
should return in both normal and error conditions.  Examples of what I mean:

	% mesg >& /dev/null; echo $status
	13

	% crypt junk < /tmp/f > /tmp/f2; echo $status
	-1

	...many others...

I got bit last night with one of those off-the-wall ones (sorry chris), and
can't help thinking that there has to be some guidelines to use on picking
exit codes, other than `exit(0) for normal termination, anything else you 
want otherwise`.

--curtis
-- 
Curtis C. Generous
DTIC Special Projects Office (DTIC-SPO)
ARPA: generous at daitc.mil
UUCP: {uunet,vrdxhq}!dgis!generous



More information about the Comp.unix.questions mailing list