Marco Maggi
2009-01-02 09:12:38 UTC
"No function in this volume of IEEE Std
1003.1-2001 shall set errno to 0."
Just to keep that in mind....
Right. So, quoting more from that same link,1003.1-2001 shall set errno to 0."
Just to keep that in mind....
An application that needs to examine the
value of errno to determine the error should
set it to 0 before a function call, then
inspect it before a subsequent function call.
The question becomes, if someone writes a scheme
layer wrapping the libc layer, then do they
violate POSIX semantics in the context of the
scheme layer if their wrapper sets errno to zero
before calling the glibc function associated with
it?
semantics filter through a Scheme layer, what
I know is that there are functions, like
"readdir()", for which setting "errno" to zero
before the call is the only way to distinguish
an error condition from another event.
So setting "errno" is a mandatory feature.
--
Marco Maggi
"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"
Marco Maggi
"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"