From 058b0118a52061ad57694c01fc8763b22b789c4d Mon Sep 17 00:00:00 2001 From: rsc Date: Mon, 3 Jan 2005 06:40:20 +0000 Subject: Some man pages. --- man/man3/errstr.3 | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'man/man3/errstr.3') diff --git a/man/man3/errstr.3 b/man/man3/errstr.3 index 1a888978..a0e6d3f0 100644 --- a/man/man3/errstr.3 +++ b/man/man3/errstr.3 @@ -73,13 +73,35 @@ a string to pass to The string returned from .I errstr is discarded. +.PP +The error string is maintained in parallel with the Unix +error number +.IR errno . +Changing +.I errno +will reset the error string, +and changing the error string via +.I errstr +or +.I werrstr +will reset +.IR errno . .SH SOURCE -.B /usr/local/plan9/src/libc/9syscall -.br -.B /usr/local/plan9/src/libc/9sys/werrstr.c +.B /usr/local/plan9/src/lib9/errstr.c .SH DIAGNOSTICS .I Errstr always returns 0. .SH SEE ALSO .IR intro (3), .IR perror (3) +.SH BUGS +The implementation sets +.I errno +to the (somewhat arbitrary) +constant 0x19283745 when +the error string is valid. +When +.I errno +is set to other values, the error string +is synthesized using +.IR strerror (3). -- cgit v1.2.3