|
|
1.1 root 1: .th PERROR III 11/5/73
2: .sh NAME
3: perror \*- system error messages
4: .sh SYNOPSIS
5: .ft B
6: perror(s)
7: .br
8: char *s;
9: .s3
10: int sys\*_nerr;
11: .br
12: char *sys\*_errlist[];
13: .s3
14: int errno;
15: .ft R
16: .br
17: .sh DESCRIPTION
18: .it Perror
19: produces a short error message
20: describing the last error encountered during a call
21: to the system from a C program.
22: First the argument string
23: .it s
24: is printed, then a colon, then the message and a new-line.
25: Most usefully, the argument string is the name
26: of the program which incurred the error.
27: The error number is taken from the external variable
28: .it errno,
29: which is set when errors occur but not cleared when
30: non-erroneous calls are made.
31: .s3
32: To simplify variant formatting
33: of messages, the vector of message strings
34: .it sys\*_errlist
35: is provided;
36: .it errno
37: can be used as an index in this table to get the
38: message string without the newline.
39: .it Sys\*_nerr
40: is the largest message number provided for in the table;
41: it should be checked because new
42: error codes may be added to the system before
43: they are added to the table.
44: .sh "SEE ALSO"
45: Introduction to System Calls
46: .sh BUGS
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.