ENOTTY error when executing cp(1)
Doug Gwyn
gwyn at smoke.BRL.MIL
Thu Sep 14 05:02:19 AEST 1989
In article <301 at 6sigma.UUCP> blm at 6sigma.UUCP (Brian Matthews) writes:
>Is it guarenteed anywhere that errno is left untouched if a system call
>succeeds?
This isn't guaranteed in any "standard" (SVID, POSIX, whatever), partly
because some apparent "system calls" may actually be implemented as
library functions that perform other real system calls to get the job
done, and some of those subordinate system calls may set errno as a
side effect without the overall emulated system call failing. To
require that errno remain untouched would force such implementations to
continually save and restore its value, a lot of work for no real gain.
You should only inspect errno when it is documented to contain a valid
value.
More information about the Comp.unix.wizards
mailing list