[vox-tech] errno upon success (a real success)?

Peter Jay Salzman vox-tech@lists.lugod.org
Wed, 9 Oct 2002 15:15:46 -0700


i've read that system and library calls can set errno, even when they're
successful.

for example, info glibc mentions that sqrt() can return a perfectly
valid value in case of an error and also set errno.  i assume they mean
when you do something like trying to take the square root of a negative
number or a "machine infinity".

but this example is kind of a stretch.  some people may consider taking
the sqrt of infinity to be an error in the first place, and therefore,
approrpriate for setting errno, whether inf is a valid return value or
not.  but whether you agree with this or not, nevermind.  my question
is...

does anyone know of an example where errno is set upon success that may
not be as much of a stretch as taking the square root of infinity?

pete

-- 
Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D