ERRSTR(2)                                               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
          intro(2), perror(2)

     Page 1                       Plan 9            (printed 11/18/24)