STRERROR(3) FreeBSD Library Functions Manual STRERROR(3)
NAME
perror, strerror, strerror_r, sys_errlist, sys_nerr — system error mes‐
sages
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdio.h>
void
perror(const char *string);
...
DESCRIPTION
...
The perror() function finds the error message corresponding to the cur‐
rent value of the global variable errno (intro(2)) and writes it, fol‐
lowed by a newline, to the standard error file descriptor. If the argu‐
ment string is non‐NULL and does not point to the null character, this
string is prepended to the message string and separated from it by a
colon and space (“: ”); otherwise, only the error message string is
printed.
...
STANDARDS
The perror() and strerror() functions conform to ISO/IEC 9899:1999
(“ISO C99”). ...