The strerror() function returns a string describing the error code passed
in the argument errnum, possibly using the LC_MESSAGES part of the
current locale to select the appropriate language. This string must not be
modified by the application, but may be modified by a subsequent call to
perror() or strerror(). No library function will modify this
The strerror_r() function is similar to strerror(), but is thread
safe. It returns the string in the user-supplied buffer buf of length
The strerror() function returns the appropriate error description string,
or an unknown error message if the error code is unknown. The value of
errno is not changed for a successful call, and is set to a nonzero
value upon error. The strerror_r() function returns 0 on success and -1
on failure, setting errno.
is a GNU extension used by glibc (since 2.0), and must be regarded as obsolete
in view of SUSv3. The GNU version may, but need not, use the user-supplied
buffer. If it does, the result may be truncated in case the supplied buffer is
too small. The result is always NUL-terminated.