Checking return values (was: Trojan Horses, NFS, etc.)
Boyd Roberts
boyd at necisa.ho.necisa.oz
Fri Oct 26 09:38:29 AEST 1990
In article <1990Oct24.193712.8693 at athena.mit.edu> scs at adam.mit.edu (Steve Summit) writes:
>The call I've still been ignoring the return value of (shake,
>shake, naughty, naughty) is fstat. Anybody know when that can
>fail, as long as the file descriptor and stat buf pointer are
>valid? Actually, don't answer that. I'm going to listen to my
>own advice and start checking that value too, even if it "can't
>fail" today.
Good idea. The fstat (or stat) may fail when it goes to write/read
the inode times on the file-system. The file-system could go bad.
Boyd Roberts boyd at necisa.ho.necisa.oz.au
``When the going gets wierd, the weird turn pro...''
More information about the Comp.unix.programmer
mailing list