NAME
perror — write
error messages to standard error
SYNOPSIS
#include <stdio.h> void perror(const char *s);
DESCRIPTION
The perror() function maps the error number accessed through the symbol errno to a language-dependent error message, which is written to the standard error stream as follows: first (if s is not a null pointer and the character pointed to by s is not the null byte), the string pointed to by s followed by a colon and a space character; then an error message string followed by a newline character. The contents of the error message strings are the same as those returned by strerror(3) with argument errno .
The perror() function will mark the file associated with the standard error stream as having been written ( st_ctime, st_mtime marked for update) at some time between its successful completion and exit(), abort(), or the completion of fflush() or fclose() on stderr.
The perror() function does not change the orientation of the standard error stream.
RETURN VALUE
The perror() function returns no value.
ERRORS
No errors are defined.
EXAMPLES
None.
APPLICATION USAGE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
strerror(3) , <stdio.h> .
DERIVATION
Derived from Issue 1 of the SVID.