[4299] in Athena Bugs
rt 6.4R: incorrect status codes for attach
daemon@ATHENA.MIT.EDU (tuna@ATHENA.MIT.EDU)
Sun Feb 25 17:28:03 1990
From: tuna@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Sun, 25 Feb 90 17:27:32 EST
System name: E40-008-6
Type and version: RTPC-ROMPC 6.4R (1 update(s) to same version)
Display type: (shouldn't matter)
What were you trying to do?
i was trying to write a small shell script that tries to attach
some locker (and periodically retry until the attach succeeds) and
then send a zephyrgram to the user informing them that the locker
had been successfully attached.
What's wrong:
attach seems to return a status code which is inconsistent with
what is given in the man page for attach. actual examples of this:
(running on ALEFNULL.MIT.EDU)
% attach heathbar ; echo status was $status
heathbar: Can't mount THEMIS.MIT.EDU:/u1/lockers/heathbar on /mit/heathbar - Connection timed out
status was 0
(running on E40-008-6.MIT.EDU)
% attach heathbar ; echo status was $status
heathbar: Can't mount themis.MIT.EDU:/u1/lockers/heathbar on /mit/heathbar - Connection timed out
status was 0
according to the man page for attach:
DIAGNOSTICS
If attach is executed with only a single filesystem argu-
ment, the exit status will be one of the following:
0 No error encountered.
(and so on ...)
it seems unreasonable to assume that encountering "Connection
timed out" problems should correspond to a status code denoting
"No error encountered".
What should have happened:
upon encountering this kinda error, attach should return a more
informative status code, perhaps (again from the man page):
11 Host communication failure.
Please describe any relevant documentation references:
see the man page for attach.