From 232268c028e3c04bb593148e211d28891d01b99c Mon Sep 17 00:00:00 2001 From: Jason McIntyre Date: Sat, 22 Nov 2003 15:48:35 +0000 Subject: document RETURN VALUES and ERRORS; from FreeBSD's page; ok tedu@ --- lib/libc/sys/minherit.2 | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'lib/libc/sys') diff --git a/lib/libc/sys/minherit.2 b/lib/libc/sys/minherit.2 index 73c52ad9382..d1ff6c19bfb 100644 --- a/lib/libc/sys/minherit.2 +++ b/lib/libc/sys/minherit.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: minherit.2,v 1.11 2003/06/02 20:18:39 millert Exp $ +.\" $OpenBSD: minherit.2,v 1.12 2003/11/22 15:48:34 jmc Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -54,6 +54,34 @@ or 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 +The +.Fn minherit +function returns the value 0 if successful; +otherwise the value \-1 is returned and the global variable +.Va errno +is set to indicate the error. +.Sh ERRORS +The +.Fn minherit +system call 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 EACCES +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 madvise 2 , .Xr mincore 2 , -- cgit v1.2.3