'exit(1);' considered useless (slight flame)

Charles LaBrec crl at pur-phy.UUCP
Sat Feb 4 00:31:28 AEST 1984


While exit(errno) is more useful than exit(1) everywhere, I would rather
see a perror() followed by an exit with a value from <sysexits.h>.  The
trouble is that not all errors come from system calls, and who really
wants to check the exit status to determine the actual error.  Furthermore,
if I do an exit(EPERM), I'd really like to know which file I failed on.

Charles LaBrec
UUCP:		pur-ee!Physics:crl, purdue!Physics:crl
INTERNET:	crl @ pur-phy.UUCP



More information about the Comp.unix mailing list