Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ perror(3) — Tru64 UNIX 4.0f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

printf(3)

strerror(3)

standards(5)

perror(3)  —  Subroutines

NAME

perror −  Writes a message explaining the current setting of errno

LIBRARY

Standard C Library (libc.a, libc.so)

SYNOPSIS

#include <stdio.h>

void perror(
        const char ∗string);

STANDARDS

Interfaces documented on this reference page conform to industry standards as follows:

perror():  ISO C, POSIX.1, XPG4, XPG4−UNIX

Refer to the standards(5) reference page for more information about industry standards and associated tags. 

PARAMETERS

stringPoints to a string containing the name of the program that caused the error. 

DESCRIPTION

The perror() function writes a message on the standard error stream that describes the current setting of the external variable errno.  The error message includes the string pointed to by the string parameter, followed by a : (colon), a blank, the system message string, and a newline character. The string parameter string should point to the name of the program that caused the error. 

To get the system error message string for use by a program, as opposed to displaying it on standard error, use the strerror() function.  For more information, see strerror(3). 

RELATED INFORMATION

Routines: printf(3), strerror(3)

Standards: standards(5)

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