DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

perror(3C)


perror -- print system error messages

Synopsis

   #include <stdio.h>
   

void perror (const char *s);

Description

perror produces a message on the standard error output (file descriptor 2), describing the last error encountered during a call to a system or library function. The argument string s is printed first, then a colon and a blank, then the message and a newline. (However, if s is a null pointer or points to a null string, the colon is not printed.) To be of most use, the argument string should include the name of the program that incurred the error. The error number is taken from the external variable errno, which is set when errors occur but not cleared when non-erroneous calls are made.

References

intro(2), gettxt(3C) strerror(3C)

Notices

perror uses the UNIX System V Message Handling Facility. The message is retrieved from the locale-specific version of the system catalog uxsyserr.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004