sys_nerr

Wichmann, Mats D mats.d.wichmann at intel.com
Wed Feb 6 11:40:10 PST 2002


> >> Call strerror() and check if it returns a NULL pointer.
> 
> >sterror doesn't return NULL; it returns "Unknown error x" if 
> >you call it with an out-of-range x. 
> 
> Looks like you found a broken strerror() implementation.

Eh?  Even the SUS wording indicates that there's no return
value reserved to indicate an error.  It does describe a way 
to test for failure, however, by mucking with errno.

The behavior on a standard Linux system (glibc 2.2) is as
described above on invalid errnos:  "Unknown error x".






More information about the lsb-discuss mailing list