xref: /inferno-os/man/2/sys-werrstr (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
SYS-WERRSTR 2
NAME
werrstr - set the system error string
SYNOPSIS
.EX include "sys.m"; sys := load Sys Sys->PATH; werrstr(s: string): int;
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 r in sys-print (2) outputs the error string. Werrstr sets the process's error string to s , to allow a function in a module to mimic the error reporting interface of a system call.
SEE ALSO
sys-intro (2), sys-print (2)