summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/mincore.210
-rw-r--r--lib/libc/sys/mount.213
-rw-r--r--lib/libc/sys/mprotect.211
-rw-r--r--lib/libc/sys/rfork.216
4 files changed, 26 insertions, 24 deletions
diff --git a/lib/libc/sys/mincore.2 b/lib/libc/sys/mincore.2
index c3a5e32..836f846 100644
--- a/lib/libc/sys/mincore.2
+++ b/lib/libc/sys/mincore.2
@@ -55,7 +55,7 @@ bytes is resident.
.\"The beginning address,
.\".Fa addr ,
.\"is first rounded down to a multiple of the page size (see
-.\".Xr getpagesize 3 Ns ).
+.\".Xr getpagesize 3 ) .
.\"The end address,
.\".Fa addr No + Fa len ,
.\"is rounded up to a multiple of the page size.
@@ -64,7 +64,7 @@ The status is returned in the
array, one character per page.
Each character is either 0 if the page is not resident, or a combination of
the following flags (defined in
-.Sy <sys/mman.h> Ns No ) Ns :
+.Aq Pa sys/mman.h ) :
.Bl -tag -width ".Dv MINCORE_REFERENCED_OTHER"
.It Dv MINCORE_INCORE
Page is in core (resident).
@@ -80,17 +80,17 @@ Page has been modified.
.Pp
The information returned by
.Fn mincore
-may be out of date by the time the function returns.
+may be out of date by the time the system call returns.
The only way to ensure that a page is resident is to lock it into memory
with the
.Xr mlock 2
-function.
+system call.
.Sh RETURN VALUES
.Rv -std mincore
.Sh ERRORS
The
.Fn mincore
-function will fail if:
+system call will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The virtual address range specified by the
diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2
index dae53d6..bd3b7e4 100644
--- a/lib/libc/sys/mount.2
+++ b/lib/libc/sys/mount.2
@@ -76,9 +76,11 @@ are unavailable until the file system is unmounted.
.Pp
By default only the super-user may call the
.Fn mount
-function.
-This restriction can be removed by setting the sysctl
-.Em vfs.usermount
+system call.
+This restriction can be removed by setting the
+.Va vfs.usermount
+.Xr sysctl 8
+variable
to a non-zero value.
.Pp
The following
@@ -188,7 +190,7 @@ system call will fail when one of the following occurs:
.Bl -tag -width Er
.It Bq Er EPERM
The caller is neither the super-user nor the owner of
-.Ar dir .
+.Fa dir .
.It Bq Er ENAMETOOLONG
A component of a pathname exceeded 255 characters,
or the entire length of a path name exceeded 1023 characters.
@@ -272,7 +274,7 @@ system call may fail with one of the following errors:
.Bl -tag -width Er
.It Bq Er EPERM
The caller is neither the super-user nor the user who issued the corresponding
-.Xr mount 2
+.Fn mount
call.
.It Bq Er ENOTDIR
A component of the path is not a directory.
@@ -302,7 +304,6 @@ mounted.
.Sh SEE ALSO
.Xr lsvfs 1 ,
.Xr mount 8 ,
-.Xr sysctl 8 ,
.Xr umount 8
.Sh BUGS
Some of the error codes need translation to more obvious messages.
diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2
index 312950f..909b240 100644
--- a/lib/libc/sys/mprotect.2
+++ b/lib/libc/sys/mprotect.2
@@ -58,14 +58,15 @@ and end addresses of a
.Pp
Currently these protection bits are known,
which can be combined, OR'd together:
-.Bl -tag width "PROT_WRITE"
-.It PROT_NONE
+.Pp
+.Bl -tag -width ".Dv PROT_WRITE" -compact
+.It Dv PROT_NONE
No permissions at all.
-.It PROT_READ
+.It Dv PROT_READ
The pages can be read.
-.It PROT_WRITE
+.It Dv PROT_WRITE
The pages can be written.
-.It PROT_EXEC
+.It Dv PROT_EXEC
The pages can be executed.
.El
.Sh RETURN VALUES
diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2
index 1081b6b..88f8144 100644
--- a/lib/libc/sys/rfork.2
+++ b/lib/libc/sys/rfork.2
@@ -35,26 +35,26 @@ The
.Fa flags
argument
is the logical OR of some subset of:
-.Bl -tag -width "RFLINUXTHPN" -offset indent
-.It RFPROC
+.Bl -tag -width ".Dv RFLINUXTHPN"
+.It Dv RFPROC
If set a new process is created; otherwise changes affect the
current process.
-.It RFNOWAIT
+.It Dv RFNOWAIT
If set, the child process will be dissociated from the parent.
Upon
exit the child will not leave a status for the parent to collect.
See
.Xr wait 2 .
-.It RFFDG
+.It Dv RFFDG
If set, the invoker's file descriptor table (see
.Xr intro 2 )
is copied; otherwise the two processes share a
single table.
-.It RFCFDG
+.It Dv RFCFDG
If set, the new process starts with a clean file descriptor table.
Is mutually exclusive with
.Dv RFFDG .
-.It RFMEM
+.It Dv RFMEM
If set, the kernel will force sharing of the entire address space,
typically by sharing the hardware page table directly.
The child
@@ -70,10 +70,10 @@ A helper function is provided to assist with this problem and will cause
the new process to run on the provided stack. See
.Xr rfork_thread 3
for information.
-.It RFSIGSHARE
+.It Dv RFSIGSHARE
If set, the kernel will force sharing the sigacts structure between the
child and the parent.
-.It RFLINUXTHPN
+.It Dv RFLINUXTHPN
If set, the kernel will return SIGUSR1 instead of SIGCHILD upon thread
exit for the child. This is intended to mimic certain Linux clone behaviour.
.El
OpenPOWER on IntegriCloud