summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-07 17:20:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-07 17:20:49 +0000
commitcd5ebec1be2b2a34afa54608db531e67f6194c8c (patch)
tree5bde3663f17d524005521fb3162b8e571fec413e /lib/libc
parente321ca862ddde2834d4e557e7c13f40fd6ed383f (diff)
add minherit() system call
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/Makefile.inc3
-rw-r--r--lib/libc/sys/madvise.21
-rw-r--r--lib/libc/sys/mincore.21
-rw-r--r--lib/libc/sys/minherit.265
-rw-r--r--lib/libc/sys/mlock.21
-rw-r--r--lib/libc/sys/msync.21
6 files changed, 71 insertions, 1 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index 4e911f4dfa0..fa4fdcb1276 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -88,7 +88,8 @@ MAN+= accept.2 access.2 acct.2 adjtime.2 bind.2 brk.2 chdir.2 chflags.2 \
getgid.2 getgroups.2 getitimer.2 getlogin.2 getpeername.2 getpgrp.2 \
getpid.2 getpriority.2 getrlimit.2 getrusage.2 getsockname.2 \
getsockopt.2 gettimeofday.2 getuid.2 intro.2 ioctl.2 kill.2 link.2 \
- listen.2 lseek.2 mkdir.2 mkfifo.2 mknod.2 madvise.2 mincore.2 mlock.2 \
+ listen.2 lseek.2 mkdir.2 mkfifo.2 mknod.2 madvise.2 mincore.2 \
+ minherit.2 mlock.2 \
mmap.2 mount.2 mprotect.2 msync.2 munmap.2 nfssvc.2 open.2 pathconf.2 \
pipe.2 profil.2 ptrace.2 quotactl.2 read.2 readlink.2 reboot.2 recv.2 \
rename.2 revoke.2 rmdir.2 select.2 send.2 setgroups.2 setpgid.2 \
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2
index 649083d7517..d852ef58556 100644
--- a/lib/libc/sys/madvise.2
+++ b/lib/libc/sys/madvise.2
@@ -62,6 +62,7 @@ The known behaviors are given in
.Ed
.Sh SEE ALSO
.Xr mincore 2 ,
+.Xr minherit 2 ,
.Xr mprotect 2 ,
.Xr msync 2 ,
.Xr munmap 2
diff --git a/lib/libc/sys/mincore.2 b/lib/libc/sys/mincore.2
index f8aa4bc0058..6d4afa6f887 100644
--- a/lib/libc/sys/mincore.2
+++ b/lib/libc/sys/mincore.2
@@ -56,6 +56,7 @@ in the character array
with a value of 1 meaning that the page is in-core.
.Sh SEE ALSO
.Xr madvise 2 ,
+.Xr minherit 2 ,
.Xr mlock 2 ,
.Xr mprotect 2 ,
.Xr msync 2 ,
diff --git a/lib/libc/sys/minherit.2 b/lib/libc/sys/minherit.2
new file mode 100644
index 00000000000..aca7ec15614
--- /dev/null
+++ b/lib/libc/sys/minherit.2
@@ -0,0 +1,65 @@
+.\" $NetBSD: mprotect.2,v 1.6 1995/10/12 15:41:08 jtc Exp $
+.\"
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)mprotect.2 8.1 (Berkeley) 6/9/93
+.\"
+.Dd June 9, 1993
+.Dt MPROTECT 2
+.Os
+.Sh NAME
+.Nm minherit
+.Nd control the inheritance of pages
+.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <sys/mman.h>
+.Ft int
+.Fn minherit "caddr_t addr" "size_t len" "int inherit"
+.Sh DESCRIPTION
+The
+.Fn minherit
+system call
+changes the specified pages to have the inheritance characteristic
+.Fa inherit .
+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 SEE ALSO
+.Xr madvise 2 ,
+.Xr mincore 2 ,
+.Xr mprotect 2 ,
+.Xr msync 2 ,
+.Xr munmap 2
+.Sh HISTORY
+The
+.Fn mprotect
+function first appeared in 4.4BSD.
diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2
index 135232bb1fc..be33648c592 100644
--- a/lib/libc/sys/mlock.2
+++ b/lib/libc/sys/mlock.2
@@ -135,6 +135,7 @@ Some portion of the indicated address range is not locked.
.Sh "SEE ALSO"
.Xr fork 2 ,
.Xr mincore 2 ,
+.Xr minherit 2 ,
.Xr mmap 2 ,
.Xr munmap 2 ,
.Xr setrlimit 2 ,
diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2
index 7feb4369ccd..f616ad88a97 100644
--- a/lib/libc/sys/msync.2
+++ b/lib/libc/sys/msync.2
@@ -86,6 +86,7 @@ parameter was negative.
An I/O error occured while writing to the file system.
.Sh SEE ALSO
.Xr madvise 2 ,
+.Xr minherit 2 ,
.Xr munmap 2 ,
.Xr mprotect 2 ,
.Xr mincore 2