Add missing RETURN VALUES/ERRORS sections.

This commit is contained in:
Mike Pritchard 1997-01-12 00:38:36 +00:00
parent aeea55e459
commit 9880dddc9e
6 changed files with 69 additions and 13 deletions

View File

@ -141,10 +141,16 @@ and
account only for real
I/O; data supplied by the caching mechanism is charged only
to the first process to read or write the data.
.Sh RETURN VALUES
Uponsuccessful completion,
.Fn getrusage
returns 0. Otherwise, a value of -1 is returned and
.Va errno
is set to indicate the error.
.Sh ERRORS
.Fn Getrusage
returns -1 on error.
The possible errors are:
The
.Fn getrusage
function will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The

View File

@ -1,4 +1,4 @@
.\" $Id$
.\" $Id: minherit.2,v 1.1 1996/02/23 19:56:54 peter Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -53,6 +53,33 @@ changes the specified pages to have the inheritance characteristic
Not all implementations will guarantee that the inheritance characteristic
can be set on a page basis;
the granularity of changes may be as large as an entire region.
.Sh RETURN VALUES
Upon successful completion,
.Fn minherit
returns 0. Otherwise, a value of -1 is returned and
.Va errno
is set to indicate the error.
.Sh ERRORS
The
.Fn minherit
function will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The virtual address range specified by the
.Fa addr
and
.Fa len
arguments is not valid.
.It Bq Er EACESS
The flags specified by the
.Fa inherit
argument were not valid for the pages specified
by the
.Fa addr
and
.Fa len
arguments.
.El
.Sh SEE ALSO
.Xr fork 2 ,
.Xr madvise 2 ,

View File

@ -166,6 +166,13 @@ and calls
Before returning,
.Fn open
enables thread rescheduling.
.Sh RETURN VALUES
If successful,
.Fn open
returns a non-negative integer, termed a file descriptor.
It returns -1 on failure, and sets
.Va errno
to indicate the error.
.Sh ERRORS
The named file is opened unless:
.Bl -tag -width Er

View File

@ -1,4 +1,4 @@
.\" $Id: ptrace.2,v 1.4 1996/08/29 21:24:15 wosch Exp $
.\" $Id: ptrace.2,v 1.5 1996/09/23 22:22:40 wosch Exp $
.\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
.\"
.\" This file is in the public domain.
@ -201,15 +201,18 @@ it loads the traced process' floating-point registers from the
pointed to by
.Fa addr .
.El
.Sh ERRORS
.Sh RETURN VALUES
Some requests can cause
.Fn ptrace
to return
.Li -1
as a non-error value; to disambiguate,
.Va errno
can be set to 0 before the call and checked afterwards. The possible
errors are:
can be set to 0 before the call and checked afterwards.
.Sh ERRORS
The
.Fn ptrace
function may fail if:
.Bl -tag -width 4n
.It Bq Er ESRCH
.Bl -bullet -compact

View File

@ -14,7 +14,7 @@
.Ft int
.Fn rfork "int flags"
.Sh DESCRIPTION
Forking, vforking or rforking is the only way new processes are created.
Forking, vforking or rforking are the only ways new processes are created.
The
.Fa flags
argument to
@ -28,7 +28,7 @@ the open file descriptor table (which, when shared, permits processes
to open and close files for other processes),
and open files.
.Fa Flags
is the logical OR of some subset of
is the logical OR of some subset of:
.Bl -tag -width "RFCNAMEG" -compact -offset indent
.It RFPROC
If set a new process is created; otherwise changes affect the
@ -81,6 +81,16 @@ will sleep, if necessary, until required process resources are available.
can be implemented as a call to
.Fn rfork "RFFDG|RFPROC"
but isn't for backwards compatibility.
.Sh RETURN VALUES
Upon successful completion,
.Fn rfork
returns a value
of 0 to the child process and returns the process ID of the child
process to the parent process. Otherwise, a value of -1 is returned
to the parent process, no child process is created, and the global
variable
.Va errno
is set to indicate the error.
.Sh ERRORS
.Fn Rfork
will fail and no child process will be created if:

View File

@ -50,17 +50,20 @@ process group leader of a new process group and has no controlling
terminal.
The calling process is the only process in either the session or the
process group.
.Pp
.Sh RETURN VALUES
Upon successful completion, the
.Fn setsid
function returns the value of the process group ID of the new process
group, which is the same as the process ID of the calling process.
.Sh ERRORS
If an error occurs,
.Fn setsid
returns -1 and the global variable
.Va errno
is set to indicate the error, as follows:
is set to indicate the error.
.Sh ERRORS
The
.Fn setsid
function will fail if:
.Bl -tag -width Er
.It Bq Er EPERM
The calling process is already a process group leader, or the process