*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> perror (3)              



NAME    [Toc]    [Back]

     perror - write error messages to standard error

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <stdio.h>

     perror(const char *string);

DESCRIPTION    [Toc]    [Back]

     The perror() function looks up the language-dependent error message
     string affiliated with an error number and writes it, followed by a newline,
 to the standard error stream.

     If the argument string is non-NULL it is prepended to the message string
     and separated from it by a colon and a space (`: ').  If string is NULL
     only the error message string is printed.

     The contents of the error message string is the same as those returned by
     strerror() with argument errno.

SEE ALSO    [Toc]    [Back]

     intro(2), psignal(3), setlocale(3), strerror(3)

STANDARDS    [Toc]    [Back]

     The perror() function conforms to ANSI X3.159-1989 (``ANSI C'').

BSD                              June 29, 1991                             BSD
[ Back ]
 Similar pages
Name OS Title
ERR_print_errors_fp OpenBSD print error messages
warnx OpenBSD formatted error messages
strerror FreeBSD system error messages
errc FreeBSD formatted error messages
err_set_exit FreeBSD formatted error messages
warn NetBSD formatted error messages
errx FreeBSD formatted error messages
vwarn NetBSD formatted error messages
warn OpenBSD formatted error messages
err FreeBSD formatted error messages
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service