Mention, along with the behavior of succeeding system calls, the
normal behavior of succeeding library functions regarding errno. (That is, they may leave arbitrary nonzero values in errno.) Ok kleink@; related to PR lib/41567 as well as a recent thread on tech-userlevel.
This commit is contained in:
parent
7982dc729e
commit
6687b6883d
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: intro.2,v 1.52 2009/06/02 13:15:41 pooka Exp $
|
.\" $NetBSD: intro.2,v 1.53 2009/07/23 02:31:56 dholland Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1980, 1983, 1986, 1991, 1993
|
.\" Copyright (c) 1980, 1983, 1986, 1991, 1993
|
||||||
.\" The Regents of the University of California. All rights reserved.
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
|
@ -64,10 +64,17 @@ a \-1 and to take action accordingly.)
|
||||||
Successful calls never set
|
Successful calls never set
|
||||||
.Va errno ;
|
.Va errno ;
|
||||||
once set, it remains until another error occurs.
|
once set, it remains until another error occurs.
|
||||||
It should only be examined after an error.
|
It should only be examined after an error has been reported, because
|
||||||
Note that a number of system calls overload the meanings of these
|
otherwise a leftover value from some previous error may be found
|
||||||
error numbers, and that the meanings must be interpreted according
|
instead.
|
||||||
to the type and circumstances of the call.
|
.Po
|
||||||
|
Many library functions that are not system calls also set
|
||||||
|
.Va errno
|
||||||
|
on return, in the same fashion.
|
||||||
|
In these cases a nonzero value may be left in
|
||||||
|
.Va errno
|
||||||
|
even upon successful return if some internal action failed.
|
||||||
|
.Pc
|
||||||
.Pp
|
.Pp
|
||||||
The manual page for each system call will list some of the common
|
The manual page for each system call will list some of the common
|
||||||
errno codes that system call can return, but that should not be
|
errno codes that system call can return, but that should not be
|
||||||
|
@ -78,6 +85,10 @@ Documenting all the error codes that a system call can return in
|
||||||
a more specification-like manner would take more resources than
|
a more specification-like manner would take more resources than
|
||||||
this project has available.
|
this project has available.
|
||||||
.Pp
|
.Pp
|
||||||
|
Note also that a number of system calls overload the meanings of these
|
||||||
|
error numbers, and that in these cases the meanings must be
|
||||||
|
interpreted according to the type and circumstances of the call.
|
||||||
|
.Pp
|
||||||
The following is a complete list of the errors and their
|
The following is a complete list of the errors and their
|
||||||
names as given in
|
names as given in
|
||||||
.Aq Pa errno.h .
|
.Aq Pa errno.h .
|
||||||
|
|
Loading…
Reference in New Issue