GDN:perror

From LibrePlanet
Jump to: navigation, search


The function perror prints an error message to the stream stderr. The orientation of stderr is not changed.

If you call perror with a message that is either a null pointer or an empty string, perror just prints the error message corresponding to errno, adding a trailing newline.

If you supply a non-null message argument, then perror prefixes its output with this string. It adds a colon and a space character to seperate the message from the error string correspond to errno.

Contents

Prototype

<source lang="c">void perror (const char *message)</source>

GDN:perror
Header stdio.h