3 errstr, rerrstr, werrstr \- description of last system call error
10 int errstr(char *err, uint nerr)
13 void rerrstr(char *err, uint nerr)
16 void werrstr(char *fmt, ...)
18 When a system call fails it returns \-1 and
19 records a null terminated string describing the error in a per-process buffer.
21 swaps the contents of that buffer with the contents of the array
28 if the per-process error string does not fit,
29 it is silently truncated at a UTF character boundary.
30 The returned string is NUL-terminated.
33 will be called with an empty string,
34 but the exchange property provides a mechanism for
35 libraries to set the return value for the next call to
38 The per-process buffer is
40 bytes long. Any error string provided by the user will
48 If no system call has generated an error since the last call to
51 the result is an empty string.
59 and outputs the error string.
62 reads the error string but does not modify the per-process buffer, so
65 will recover the same string.
70 style format as its argument and uses it to format
73 The string returned from
77 The error string is maintained in parallel with the Unix
82 will reset the error string,
83 and changing the error string via
90 .B \*9/src/lib9/errstr.c
98 The implementation sets
100 to the (somewhat arbitrary)
101 constant 0x19283745 when
102 the error string is valid.
105 is set to other values, the error string