uux exit status ignored in mail

utzoo!henry utzoo!henry
Mon Jul 12 22:06:08 AEST 1982


mail(1) ignores the exit status of a uux spawned off to send remote
mail.  The result is that even when the mail is immediately recognized
as unsendable (e.g. first site in the path is unknown), no dead.letter
file results.  The following change to the last two lines of sendrmt()
cures this:

	< 	pclose(rmf);
	< 	exit(0);
	---
	> 	sts = pclose(rmf);
	> 	exit((sts == 0) ? 0 : 1);

The explicit conditional is needed because exit() ignores the high byte
of its argument, which is where a non-zero status normally appears.



More information about the Net.bugs.v7 mailing list