ERRSTR(2)
NAME
errstr − description of last system call error
SYNOPSIS
int errstr(char ∗ans)
DESCRIPTION
When a system call fails it returns −1 and records a string describing the error in a per-process buffer. Errstr copies the contents of that buffer into the array ans and clears the buffer. Ans should contain at least ERRLEN characters (defined in <libc.h>).
The verb r in print(2) calls errstr and outputs the error string.
SEE ALSO
Plan 9 — January 03, 1993