summaryrefslogtreecommitdiff
path: root/man/2/sys-werrstr
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
commit46439007cf417cbd9ac8049bb4122c890097a0fa (patch)
tree6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /man/2/sys-werrstr
parent37da2899f40661e3e9631e497da8dc59b971cbd0 (diff)
20060303-partial
Diffstat (limited to 'man/2/sys-werrstr')
-rw-r--r--man/2/sys-werrstr26
1 files changed, 26 insertions, 0 deletions
diff --git a/man/2/sys-werrstr b/man/2/sys-werrstr
new file mode 100644
index 00000000..add8206d
--- /dev/null
+++ b/man/2/sys-werrstr
@@ -0,0 +1,26 @@
+.TH SYS-WERRSTR 2
+.SH NAME
+werrstr \- set the system error string
+.SH SYNOPSIS
+.EX
+include "sys.m";
+sys := load Sys Sys->PATH;
+
+werrstr(s: string): int;
+.EE
+.SH DESCRIPTION
+When a system call fails, it returns an error value (often -1)
+and records a string describing the error in a per-process location.
+The verb
+.B r
+in
+.IR sys-print (2)
+outputs the error string.
+.B Werrstr
+sets the process's error string to
+.IR s ,
+to allow a function in a module to mimic the error reporting
+interface of a system call.
+.SH SEE ALSO
+.IR sys-intro (2),
+.IR sys-print (2)