PERROR(3) Library Functions Manual PERROR(3)

perrorwrite error messages to standard error

#include <stdio.h>

void perror(const char *s);

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 ( , marked for update) at some time between its successful completion and , , or the completion of or on .

The perror() function does not change the orientation of the standard error stream.

The perror() function returns no value.

No errors are defined.

None.

None.

None.

strerror(3) , <stdio.h> .

Derived from Issue 1 of the SVID.

February 1997 posix.fail