Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ perror(3C) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fmtmsg(3C)

strerror(3C)

perror(3C)                                                       perror(3C)

NAME
     perror - print system error messages

SYNOPSIS
     #include <stdio.h>

     void perror(const char *s);

DESCRIPTION
     perror() produces a message on the standard error output, describing
     the last error which occurred 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. For the argument
     string s to be useful, it should include the name of the program that
     incurred the error. The error number is taken from the external vari-
     able errno, which is set when errors occur but not cleared when non-
     erroneous calls are made.

     The contents of the string returned by perror() are determined by the
     setting of the LCMESSAGES environment variable in the current locale.

     If standard error output is redirected to a file, this is marked as
     having been written (stctime and stmtime marked for update) after
     the successful completion of perror() and before exit(), abort(), or
     after the completion of fflush() or fclose() on stderr.

SEE ALSO
     fmtmsg(3C), strerror(3C).


























Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026