diff options
author | mpp <mpp@FreeBSD.org> | 1997-01-12 00:38:36 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1997-01-12 00:38:36 +0000 |
commit | 54b96968b6dec7e1b3cbfa045f28dd9c4e0ecc45 (patch) | |
tree | 90aaba8b57f96154b6594ad2a7c5a9b92e206d48 /lib/libc/sys | |
parent | 222e4ec9673e5231e2af9b2b72919d890d8829ed (diff) | |
download | FreeBSD-src-54b96968b6dec7e1b3cbfa045f28dd9c4e0ecc45.zip FreeBSD-src-54b96968b6dec7e1b3cbfa045f28dd9c4e0ecc45.tar.gz |
Add missing RETURN VALUES/ERRORS sections.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/getrusage.2 | 12 | ||||
-rw-r--r-- | lib/libc/sys/minherit.2 | 29 | ||||
-rw-r--r-- | lib/libc/sys/open.2 | 7 | ||||
-rw-r--r-- | lib/libc/sys/ptrace.2 | 11 | ||||
-rw-r--r-- | lib/libc/sys/rfork.2 | 14 | ||||
-rw-r--r-- | lib/libc/sys/setsid.2 | 9 |
6 files changed, 69 insertions, 13 deletions
diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2 index 7219304..0f92569 100644 --- a/lib/libc/sys/getrusage.2 +++ b/lib/libc/sys/getrusage.2 @@ -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 diff --git a/lib/libc/sys/minherit.2 b/lib/libc/sys/minherit.2 index cc26fa6..997bafd 100644 --- a/lib/libc/sys/minherit.2 +++ b/lib/libc/sys/minherit.2 @@ -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 , diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index ac5335a..7dcaeaf 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -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 diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index 49bb163..e5a0597 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -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 diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2 index c41b89b..1ba7b56 100644 --- a/lib/libc/sys/rfork.2 +++ b/lib/libc/sys/rfork.2 @@ -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: diff --git a/lib/libc/sys/setsid.2 b/lib/libc/sys/setsid.2 index d56ad1f..27e5f42 100644 --- a/lib/libc/sys/setsid.2 +++ b/lib/libc/sys/setsid.2 @@ -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 |