New sentence, new line. From Robert Elz.
This commit is contained in:
parent
3bee357a2d
commit
f6bcf9642e
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: accept.2,v 1.20 2002/02/08 01:28:16 ross Exp $
|
||||
.\" $NetBSD: accept.2,v 1.21 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1990, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -57,12 +57,12 @@ and is listening for connections after a
|
||||
The
|
||||
.Fn accept
|
||||
argument
|
||||
extracts the first connection request
|
||||
on the queue of pending connections, creates
|
||||
a new socket with the same properties of
|
||||
extracts the first connection request on the queue of pending
|
||||
connections, creates a new socket with the same properties of
|
||||
.Fa s
|
||||
and allocates a new file descriptor
|
||||
for the socket. If no pending connections are
|
||||
for the socket.
|
||||
If no pending connections are
|
||||
present on the queue, and the socket is not marked
|
||||
as non-blocking,
|
||||
.Fn accept
|
||||
@ -73,7 +73,8 @@ connections are present on the queue,
|
||||
returns an error as described below.
|
||||
The accepted socket
|
||||
may not be used
|
||||
to accept more connections. The original socket
|
||||
to accept more connections.
|
||||
The original socket
|
||||
.Fa s
|
||||
remains open.
|
||||
.Pp
|
||||
@ -135,7 +136,8 @@ call with providing only the control information,
|
||||
or by calling
|
||||
.Xr setsockopt 2 .
|
||||
.Sh RETURN VALUES
|
||||
The call returns \-1 on error. If it succeeds, it returns a non-negative
|
||||
The call returns \-1 on error.
|
||||
If it succeeds, it returns a non-negative
|
||||
integer that is a descriptor for the accepted socket.
|
||||
.Sh ERRORS
|
||||
The
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: access.2,v 1.16 2002/02/08 01:28:16 ross Exp $
|
||||
.\" $NetBSD: access.2,v 1.17 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -82,7 +82,8 @@ the file may not actually have read or write permission bits set.
|
||||
If a process has super-user privileges and indicates success for
|
||||
.Dv X_OK ,
|
||||
at least one of the user, group, or other execute bits is set.
|
||||
(However, the file may still not be executable. See
|
||||
(However, the file may still not be executable.
|
||||
See
|
||||
.Xr execve 2 . )
|
||||
.Sh RETURN VALUES
|
||||
If
|
||||
@ -113,7 +114,8 @@ file presently being executed.
|
||||
.It Bq Er EACCES
|
||||
Permission bits of the file mode do not permit the requested
|
||||
access, or search permission is denied on a component of the
|
||||
path prefix. The owner of a file has permission checked with
|
||||
path prefix.
|
||||
The owner of a file has permission checked with
|
||||
respect to the ``owner'' read, write, and execute mode bits,
|
||||
members of the file's group other than the owner have permission
|
||||
checked with respect to the ``group'' mode bits, and all
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: adjtime.2,v 1.14 2002/05/12 15:48:37 wiz Exp $
|
||||
.\" $NetBSD: adjtime.2,v 1.15 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -86,7 +86,8 @@ If the calling user is not the super user, then the
|
||||
function in the standard C library will try to use the
|
||||
.Xr clockctl 4
|
||||
device if present, thus making possible for non privileged users to
|
||||
adjust the system time. If
|
||||
adjust the system time.
|
||||
If
|
||||
.Xr clockctl 4
|
||||
is not present or not accessible, then
|
||||
.Fn adjust
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: brk.2,v 1.27 2002/02/08 01:28:16 ross Exp $
|
||||
.\" $NetBSD: brk.2,v 1.28 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -59,7 +59,8 @@ The
|
||||
and
|
||||
.Fn sbrk
|
||||
functions are used to change the amount of memory allocated in a
|
||||
process's data segment. They do this by moving the location of the
|
||||
process's data segment.
|
||||
They do this by moving the location of the
|
||||
.Dq break .
|
||||
The break is the first address after the end of the process's
|
||||
uninitialized data segment (also known as the
|
||||
@ -168,7 +169,8 @@ with
|
||||
.Xr malloc 3 ,
|
||||
.Xr free 3 ,
|
||||
and similar functions may result in non-portable program
|
||||
behavior. Caution is advised.
|
||||
behavior.
|
||||
Caution is advised.
|
||||
.Pp
|
||||
Setting the break may fail due to a temporary lack of swap space.
|
||||
It is not possible to distinguish this from a failure caused by
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: chmod.2,v 1.22 2002/04/29 01:41:45 simonb Exp $
|
||||
.\" $NetBSD: chmod.2,v 1.23 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -114,16 +114,17 @@ The
|
||||
.Em sticky bit )
|
||||
indicates to the system which executable files are shareable (the
|
||||
default) and the system maintains the program text of the files
|
||||
in the swap area. The sticky bit may only be set by the super user
|
||||
in the swap area.
|
||||
The sticky bit may only be set by the super user
|
||||
on shareable executable files.
|
||||
.Pp
|
||||
If mode
|
||||
.Dv ISVTX
|
||||
(the `sticky bit') is set on a directory,
|
||||
an unprivileged user may not delete or rename
|
||||
files of other users in that directory. The sticky bit may be
|
||||
set by any user on a directory which the user owns or has appropriate
|
||||
permissions.
|
||||
files of other users in that directory.
|
||||
The sticky bit may be set by any user on a directory which the user
|
||||
owns or has appropriate permissions.
|
||||
For more details of the properties of the sticky bit, see
|
||||
.Xr sticky 8 .
|
||||
.Pp
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: chroot.2,v 1.15 2002/02/08 01:28:16 ross Exp $
|
||||
.\" $NetBSD: chroot.2,v 1.16 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -75,8 +75,8 @@ function performs the same operation on an open directory file
|
||||
known by the file descriptor
|
||||
.Fa fd .
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, a value of 0 is returned. Otherwise,
|
||||
a value of -1 is returned and
|
||||
Upon successful completion, a value of 0 is returned.
|
||||
Otherwise, a value of -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate an error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: clock_settime.2,v 1.13 2002/02/08 01:28:16 ross Exp $
|
||||
.\" $NetBSD: clock_settime.2,v 1.14 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -117,7 +117,8 @@ If the calling user is not the super-user, then the
|
||||
function in the standard C library will try to use the
|
||||
.Xr clockctl 4
|
||||
device if present, thus making possible for non privileged users to
|
||||
set the system time. If
|
||||
set the system time.
|
||||
If
|
||||
.Xr clockctl 4
|
||||
is not present or not accessible, then
|
||||
.Fn clock_settime
|
||||
@ -125,7 +126,8 @@ reverts to the
|
||||
.Fn clock_settime
|
||||
system call, which is restricted to the super user.
|
||||
.Sh RETURN VALUES
|
||||
A value of 0 is returned on success. Otherwise, a value of -1 is returned and
|
||||
A value of 0 is returned on success.
|
||||
Otherwise, a value of -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: clone.2,v 1.6 2002/02/08 01:28:17 ross Exp $
|
||||
.\" $NetBSD: clone.2,v 1.7 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -67,8 +67,8 @@ by
|
||||
The argument
|
||||
.Ar arg
|
||||
is passed to the entry point, as a means for the parent to provide
|
||||
context to the child. The stack pointer for the child process will
|
||||
be set to
|
||||
context to the child.
|
||||
The stack pointer for the child process will be set to
|
||||
.Ar stack .
|
||||
Note that the
|
||||
.Nm
|
||||
@ -80,25 +80,28 @@ argument as appropriate for the stack direction.
|
||||
The
|
||||
.Ar flags
|
||||
argument specifies several options that control how the child process
|
||||
is created. The lower 8 bits of
|
||||
is created.
|
||||
The lower 8 bits of
|
||||
.Ar flags
|
||||
specify the signal that is to be sent to the parent when the child
|
||||
exits. The following flags may also be specified by bitwise-or'ing
|
||||
exits.
|
||||
The following flags may also be specified by bitwise-or'ing
|
||||
them with the signal value:
|
||||
.Bl -tag -width "CLONE_SIGHAND"
|
||||
.It Dv CLONE_VM
|
||||
Share the virtual address space with the parent. The address
|
||||
space is shared in the same way as
|
||||
Share the virtual address space with the parent.
|
||||
The address space is shared in the same way as
|
||||
.Xr vfork 2 .
|
||||
.It Dv CLONE_FS
|
||||
Share the
|
||||
.Dq file system information
|
||||
with the parent. This include the current working directory and file
|
||||
creation mask.
|
||||
with the parent.
|
||||
This include the current working directory and file creation mask.
|
||||
.It Dv CLONE_FILES
|
||||
Share the file descriptor table with the parent.
|
||||
.It Dv CLONE_SIGHAND
|
||||
Share the signal handler set with the parent. Note that the signal mask
|
||||
Share the signal handler set with the parent.
|
||||
Note that the signal mask
|
||||
is never shared between the parent and the child, even if
|
||||
.Dv CLONE_SIGHAND
|
||||
is set.
|
||||
@ -110,15 +113,15 @@ the parent blocks until the child exits.
|
||||
.Pp
|
||||
The
|
||||
.Nm
|
||||
call returns the pid of the child in the parent's context. The child
|
||||
is provided no return value, since it begins execution at a different
|
||||
address.
|
||||
call returns the pid of the child in the parent's context.
|
||||
The child is provided no return value, since it begins execution at
|
||||
a different address.
|
||||
.Pp
|
||||
If the child process's entry point returns, the value it returns
|
||||
is passed to
|
||||
.Xr _exit 2 ,
|
||||
and the child process exits. Note that if the child process wants
|
||||
to exit directly, it should use
|
||||
and the child process exits.
|
||||
Note that if the child process wants to exit directly, it should use
|
||||
.Xr _exit 2 ,
|
||||
and not
|
||||
.Xr exit 3 ,
|
||||
@ -135,7 +138,8 @@ Note that
|
||||
.Nm
|
||||
is not intended to be used for new native
|
||||
.Nx
|
||||
applications. It is provided as a means to port software
|
||||
applications.
|
||||
It is provided as a means to port software
|
||||
originally written for the Linux operating system to
|
||||
.Nx .
|
||||
.Sh RETURN VALUES
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: dup.2,v 1.13 2002/02/08 01:28:17 ross Exp $
|
||||
.\" $NetBSD: dup.2,v 1.14 2002/10/01 18:10:43 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -58,12 +58,11 @@ the calling process
|
||||
The argument
|
||||
.Fa oldd
|
||||
is a small non-negative integer index in
|
||||
the per-process descriptor table. The value must be less
|
||||
than the size of the table, which is returned by
|
||||
the per-process descriptor table.
|
||||
The value must be less than the size of the table, which is returned by
|
||||
.Xr getdtablesize 3 .
|
||||
The new descriptor returned by the call
|
||||
is the lowest numbered descriptor
|
||||
currently not in use by the process.
|
||||
is the lowest numbered descriptor currently not in use by the process.
|
||||
.Pp
|
||||
The object referenced by the descriptor does not distinguish
|
||||
between
|
||||
@ -95,7 +94,8 @@ In
|
||||
.Fn dup2 ,
|
||||
the value of the new descriptor
|
||||
.Fa newd
|
||||
is specified. If this descriptor is already
|
||||
is specified.
|
||||
If this descriptor is already
|
||||
in use, the descriptor is first deallocated as if a
|
||||
.Xr close 2
|
||||
call had been done first.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: execve.2,v 1.25 2002/09/26 12:08:10 christos Exp $
|
||||
.\" $NetBSD: execve.2,v 1.26 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -57,7 +57,8 @@ This file is either an executable object file,
|
||||
or a file of data for an interpreter.
|
||||
An executable object file consists of an identifying header,
|
||||
followed by pages of data representing the initial program (text)
|
||||
and initialized data pages. Additional pages may be specified
|
||||
and initialized data pages.
|
||||
Additional pages may be specified
|
||||
by the header to be initialized with zero data; see
|
||||
.Xr a.out 5 .
|
||||
.Pp
|
||||
@ -88,8 +89,9 @@ file becomes the second argument;
|
||||
otherwise, the name of the originally
|
||||
.\" was .Fn execve Ap d
|
||||
\fBexecve\fP'd
|
||||
file becomes the first argument. The original arguments are shifted over to
|
||||
become the subsequent arguments. The zeroth argument, normally the name of the
|
||||
file becomes the first argument.
|
||||
The original arguments are shifted over to become the subsequent arguments.
|
||||
The zeroth argument, normally the name of the
|
||||
.\" was .Fn execve Ap d
|
||||
\fBexecve\fP'd
|
||||
file, is left unchanged.
|
||||
@ -134,8 +136,8 @@ The intent is to ensure these descriptors are not unallocated, since
|
||||
many libraries make assumptions about the use of these 3 file descriptors.
|
||||
.Pp
|
||||
Signals set to be ignored in the calling process are set to be ignored in
|
||||
the
|
||||
new process. Signals which are set to be caught in the calling process image
|
||||
the new process.
|
||||
Signals which are set to be caught in the calling process image
|
||||
are set to default action in the new process image.
|
||||
Blocked signals remain blocked regardless of changes to the signal action.
|
||||
The signal stack is reset to be undefined (see
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: fcntl.2,v 1.24 2002/09/24 23:58:54 wiz Exp $
|
||||
.\" $NetBSD: fcntl.2,v 1.25 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -284,7 +284,8 @@ but may not start or extend before the beginning of the file.
|
||||
A lock is set to extend to the largest possible value of the
|
||||
file offset for that file if
|
||||
.Fa l_len
|
||||
is set to zero. If
|
||||
is set to zero.
|
||||
If
|
||||
.Fa l_whence
|
||||
and
|
||||
.Fa l_start
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: fdatasync.2,v 1.9 2002/02/08 01:28:17 ross Exp $
|
||||
.\" $NetBSD: fdatasync.2,v 1.10 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -63,7 +63,8 @@ This behaviour is commonly known as
|
||||
synchronized I/O data integrity completion.
|
||||
.Ef
|
||||
.Sh RETURN VALUES
|
||||
A value of 0 is returned on success. Otherwise, a value -1 is returned and
|
||||
A value of 0 is returned on success.
|
||||
Otherwise, a value -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: fhopen.2,v 1.5 2002/02/08 01:28:17 ross Exp $
|
||||
.\" $NetBSD: fhopen.2,v 1.6 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1999 National Aeronautics & Space Administration
|
||||
.\" All rights reserved.
|
||||
@ -61,13 +61,15 @@ opens the file referenced by
|
||||
.Fa fhp
|
||||
for reading and/or writing as specified by the argument
|
||||
.Fa flags
|
||||
and returns the file descriptor to the calling process. The
|
||||
and returns the file descriptor to the calling process.
|
||||
The
|
||||
.Fa flags
|
||||
are specified by
|
||||
.Em or Ns 'ing
|
||||
together the flags used for the
|
||||
.Xr open 2
|
||||
call. All said flags are valid except for
|
||||
call.
|
||||
All said flags are valid except for
|
||||
.Dv O_CREAT .
|
||||
.Pp
|
||||
.Fn fhstat
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: flock.2,v 1.14 2002/02/08 01:28:17 ross Exp $
|
||||
.\" $NetBSD: flock.2,v 1.15 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -93,7 +93,8 @@ after other processes have gained and released the lock).
|
||||
.Pp
|
||||
Requesting a lock on an object that is already locked
|
||||
normally causes the caller to be blocked until the lock may be
|
||||
acquired. If
|
||||
acquired.
|
||||
If
|
||||
.Dv LOCK_NB
|
||||
is included in
|
||||
.Fa operation ,
|
||||
@ -102,13 +103,14 @@ the error
|
||||
.Er EAGAIN
|
||||
will be returned.
|
||||
.Sh NOTES
|
||||
Locks are on files, not file descriptors. That is, file descriptors
|
||||
duplicated through
|
||||
Locks are on files, not file descriptors.
|
||||
That is, file descriptors duplicated through
|
||||
.Xr dup 2
|
||||
or
|
||||
.Xr fork 2
|
||||
do not result in multiple instances of a lock, but rather multiple
|
||||
references to a single lock. If a process holding a lock on a file
|
||||
references to a single lock.
|
||||
If a process holding a lock on a file
|
||||
forks and the child explicitly unlocks the file, the parent will
|
||||
lose its lock.
|
||||
.Pp
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: fsync.2,v 1.9 2002/02/08 01:28:17 ross Exp $
|
||||
.\" $NetBSD: fsync.2,v 1.10 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -58,8 +58,8 @@ should be used by programs that require a file to be
|
||||
in a known state, for example, in building a simple transaction
|
||||
facility.
|
||||
.Sh RETURN VALUES
|
||||
A 0 value is returned on success. A -1 value indicates
|
||||
an error.
|
||||
A 0 value is returned on success.
|
||||
A -1 value indicates an error.
|
||||
.Sh ERRORS
|
||||
The
|
||||
.Fn fsync
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getitimer.2,v 1.14 2002/02/08 01:28:17 ross Exp $
|
||||
.\" $NetBSD: getitimer.2,v 1.15 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -89,7 +89,8 @@ is non-zero, it specifies a value to be used in reloading
|
||||
when the timer expires.
|
||||
Setting
|
||||
.Fa it_value
|
||||
to 0 disables a timer. Setting
|
||||
to 0 disables a timer.
|
||||
Setting
|
||||
.Fa it_interval
|
||||
to 0 causes a timer to be disabled after its next expiration (assuming
|
||||
.Fa it_value
|
||||
@ -101,7 +102,8 @@ system clock are rounded up to this resolution
|
||||
.Pp
|
||||
The
|
||||
.Dv ITIMER_REAL
|
||||
timer decrements in real time. A
|
||||
timer decrements in real time.
|
||||
A
|
||||
.Dv SIGALRM
|
||||
signal is
|
||||
delivered when this timer expires.
|
||||
@ -109,7 +111,8 @@ delivered when this timer expires.
|
||||
The
|
||||
.Dv ITIMER_VIRTUAL
|
||||
timer decrements in process virtual time.
|
||||
It runs only when the process is executing. A
|
||||
It runs only when the process is executing.
|
||||
A
|
||||
.Dv SIGVTALRM
|
||||
signal
|
||||
is delivered when it expires.
|
||||
@ -117,15 +120,16 @@ is delivered when it expires.
|
||||
The
|
||||
.Dv ITIMER_PROF
|
||||
timer decrements both in process virtual time and
|
||||
when the system is running on behalf of the process. It is designed
|
||||
to be used by interpreters in statistically profiling the execution
|
||||
of interpreted programs.
|
||||
when the system is running on behalf of the process.
|
||||
It is designed to be used by interpreters in statistically profiling
|
||||
the execution of interpreted programs.
|
||||
Each time the
|
||||
.Dv ITIMER_PROF
|
||||
timer expires, the
|
||||
.Dv SIGPROF
|
||||
signal is
|
||||
delivered. Because this signal may interrupt in-progress
|
||||
delivered.
|
||||
Because this signal may interrupt in-progress
|
||||
system calls, programs using this timer must be prepared to
|
||||
restart interrupted system calls.
|
||||
.Sh NOTES
|
||||
@ -138,9 +142,9 @@ tests if a time value is non-zero, and
|
||||
.Fa timercmp
|
||||
compares two time values.
|
||||
.Sh RETURN VALUES
|
||||
If the calls succeed, a value of 0 is returned. If an error occurs,
|
||||
the value -1 is returned, and a more precise error code is placed
|
||||
in the global variable
|
||||
If the calls succeed, a value of 0 is returned.
|
||||
If an error occurs, the value -1 is returned, and a more precise error
|
||||
code is placed in the global variable
|
||||
.Va errno .
|
||||
.Sh ERRORS
|
||||
.Fn getitimer
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getlogin.2,v 1.14 2002/08/20 16:30:30 wiz Exp $
|
||||
.\" $NetBSD: getlogin.2,v 1.15 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1989, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -125,7 +125,8 @@ If the name has not been set, it returns
|
||||
.Dv NULL .
|
||||
If a call to
|
||||
.Fn setlogin
|
||||
succeeds, a value of 0 is returned. If
|
||||
succeeds, a value of 0 is returned.
|
||||
If
|
||||
.Fn setlogin
|
||||
fails, a value of -1 is returned and an error code is
|
||||
placed in the global location
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getpriority.2,v 1.11 2002/02/08 01:28:17 ross Exp $
|
||||
.\" $NetBSD: getpriority.2,v 1.12 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -80,17 +80,21 @@ A zero value of
|
||||
.Fa who
|
||||
denotes the current process, process group, or user.
|
||||
.Fa prio
|
||||
is a value in the range -20 to 20. The default priority is 0;
|
||||
lower priorities cause more favorable scheduling. A value of 19 or 20
|
||||
is a value in the range -20 to 20.
|
||||
The default priority is 0;
|
||||
lower priorities cause more favorable scheduling.
|
||||
A value of 19 or 20
|
||||
will schedule a process only when nothing at priority \*(Le 0 is runnable.
|
||||
.Pp
|
||||
The
|
||||
.Fn getpriority
|
||||
call returns the highest priority (lowest numerical value)
|
||||
enjoyed by any of the specified processes. The
|
||||
enjoyed by any of the specified processes.
|
||||
The
|
||||
.Fn setpriority
|
||||
call sets the priorities of all of the specified processes
|
||||
to the specified value. Only the super-user may lower priorities.
|
||||
to the specified value.
|
||||
Only the super-user may lower priorities.
|
||||
.Sh RETURN VALUES
|
||||
Since
|
||||
.Fn getpriority
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getrlimit.2,v 1.21 2002/02/08 01:28:18 ross Exp $
|
||||
.\" $NetBSD: getrlimit.2,v 1.22 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -54,7 +54,8 @@ and each process it creates may be obtained with the
|
||||
.Fn getrlimit
|
||||
call, and set with the
|
||||
.Fn setrlimit
|
||||
call. Resources of an arbitrary process can be obtained/changed using
|
||||
call.
|
||||
Resources of an arbitrary process can be obtained/changed using
|
||||
.Xr sysctl 3 .
|
||||
..
|
||||
.Pp
|
||||
@ -97,11 +98,12 @@ this defines how far a program's stack segment may be extended.
|
||||
Stack extension is performed automatically by the system.
|
||||
.El
|
||||
.Pp
|
||||
A resource limit is specified as a soft limit and a hard limit. When a
|
||||
soft limit is exceeded a process may receive a signal (for example, if
|
||||
the cpu time or file size is exceeded), but it will be allowed to
|
||||
A resource limit is specified as a soft limit and a hard limit.
|
||||
When a soft limit is exceeded a process may receive a signal (for example,
|
||||
if the cpu time or file size is exceeded), but it will be allowed to
|
||||
continue execution until it reaches the hard limit (or modifies
|
||||
its resource limit). The
|
||||
its resource limit).
|
||||
The
|
||||
.Em rlimit
|
||||
structure is used to specify the hard and soft limits on a resource,
|
||||
.Bd -literal -offset indent
|
||||
@ -111,8 +113,8 @@ struct rlimit {
|
||||
};
|
||||
.Ed
|
||||
.Pp
|
||||
Only the super-user may raise the maximum limits. Other users
|
||||
may only alter
|
||||
Only the super-user may raise the maximum limits.
|
||||
Other users may only alter
|
||||
.Fa rlim_cur
|
||||
within the range from 0 to
|
||||
.Fa rlim_max
|
||||
@ -151,15 +153,15 @@ A file I/O operation that would create a file larger that the process'
|
||||
soft limit will cause the write to fail and a signal
|
||||
.Dv SIGXFSZ
|
||||
to be
|
||||
generated; this normally terminates the process, but may be caught. When
|
||||
the soft cpu time limit is exceeded, a signal
|
||||
generated; this normally terminates the process, but may be caught.
|
||||
When the soft cpu time limit is exceeded, a signal
|
||||
.Dv SIGXCPU
|
||||
is sent to the
|
||||
offending process.
|
||||
.Sh RETURN VALUES
|
||||
A 0 return value indicates that the call succeeded, changing
|
||||
or returning the resource limit. Otherwise, -1 is returned
|
||||
and the global variable
|
||||
or returning the resource limit.
|
||||
Otherwise, -1 is returned and the global variable
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getrusage.2,v 1.12 2002/02/08 01:28:18 ross Exp $
|
||||
.\" $NetBSD: getrusage.2,v 1.13 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1985, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -94,7 +94,8 @@ the maximum resident set size utilized (in kilobytes).
|
||||
.It Fa ru_ixrss
|
||||
an \*(lqintegral\*(rq value indicating the amount of memory used
|
||||
by the text segment
|
||||
that was also shared among other processes. This value is expressed
|
||||
that was also shared among other processes.
|
||||
This value is expressed
|
||||
in units of kilobytes * ticks-of-execution.
|
||||
.It Fa ru_idrss
|
||||
an integral value of the amount of unshared memory residing in the
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: getsockopt.2,v 1.23 2002/02/08 01:28:18 ross Exp $
|
||||
.\" $NetBSD: getsockopt.2,v 1.24 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -54,7 +54,8 @@ and
|
||||
.Fn setsockopt
|
||||
manipulate the
|
||||
.Em options
|
||||
associated with a socket. Options may exist at multiple
|
||||
associated with a socket.
|
||||
Options may exist at multiple
|
||||
protocol levels; they are always present at the uppermost
|
||||
.Dq socket
|
||||
level.
|
||||
@ -67,8 +68,8 @@ is specified as
|
||||
.Dv SOL_SOCKET .
|
||||
To manipulate options at any
|
||||
other level the protocol number of the appropriate protocol
|
||||
controlling the option is supplied. For example,
|
||||
to indicate that an option is to be interpreted by the
|
||||
controlling the option is supplied.
|
||||
For example, to indicate that an option is to be interpreted by the
|
||||
.Tn TCP
|
||||
protocol,
|
||||
.Fa level
|
||||
@ -86,15 +87,16 @@ are used to access option values for
|
||||
For
|
||||
.Fn getsockopt
|
||||
they identify a buffer in which the value for the
|
||||
requested option(s) are to be returned. For
|
||||
requested option(s) are to be returned.
|
||||
For
|
||||
.Fn getsockopt ,
|
||||
.Fa optlen
|
||||
is a value-result parameter, initially containing the
|
||||
size of the buffer pointed to by
|
||||
.Fa optval ,
|
||||
and modified on return to indicate the actual size of
|
||||
the value returned. If no option value is
|
||||
to be supplied or returned,
|
||||
the value returned.
|
||||
If no option value is to be supplied or returned,
|
||||
.Fa optval
|
||||
may be NULL.
|
||||
.Pp
|
||||
@ -174,16 +176,16 @@ This option permits multiple instances of a program to each
|
||||
receive UDP/IP multicast or broadcast datagrams destined for the bound port.
|
||||
.Dv SO_KEEPALIVE
|
||||
enables the
|
||||
periodic transmission of messages on a connected socket. Should the
|
||||
connected party fail to respond to these messages, the connection is
|
||||
considered broken and processes using the socket are notified via a
|
||||
periodic transmission of messages on a connected socket.
|
||||
Should the connected party fail to respond to these messages, the connection
|
||||
is considered broken and processes using the socket are notified via a
|
||||
.Dv SIGPIPE
|
||||
signal when attempting to send data.
|
||||
.Dv SO_DONTROUTE
|
||||
indicates that outgoing messages should
|
||||
bypass the standard routing facilities. Instead, messages are directed
|
||||
to the appropriate network interface according to the network portion
|
||||
of the destination address.
|
||||
bypass the standard routing facilities.
|
||||
Instead, messages are directed to the appropriate network interface
|
||||
according to the network portion of the destination address.
|
||||
.Pp
|
||||
.Dv SO_LINGER
|
||||
controls the action taken when unsent messages
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: gettimeofday.2,v 1.18 2002/02/08 01:28:18 ross Exp $
|
||||
.\" $NetBSD: gettimeofday.2,v 1.19 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -60,10 +60,12 @@ The system's notion of the current UTC time is obtained with the
|
||||
.Fn gettimeofday
|
||||
call, and set with the
|
||||
.Fn settimeofday
|
||||
call. The time is expressed in seconds and microseconds
|
||||
since midnight (0 hour), January 1, 1970. The resolution of the system
|
||||
clock is hardware dependent, and the time may be updated continuously or
|
||||
in ``ticks.'' If
|
||||
call.
|
||||
The time is expressed in seconds and microseconds
|
||||
since midnight (0 hour), January 1, 1970.
|
||||
The resolution of the system clock is hardware dependent,
|
||||
and the time may be updated continuously or in ``ticks.''
|
||||
If
|
||||
.Fa tp
|
||||
is NULL, the time will not be returned or set.
|
||||
.Pp
|
||||
@ -89,7 +91,8 @@ struct timezone {
|
||||
.Pp
|
||||
The
|
||||
.Fa timezone
|
||||
structure is provided only for source compatibility. It is ignored by
|
||||
structure is provided only for source compatibility.
|
||||
It is ignored by
|
||||
.Fn settimeofday ,
|
||||
and
|
||||
.Fn gettimeofday
|
||||
@ -100,7 +103,8 @@ If the calling user is not the super-user, then the
|
||||
function in the standard C library will try to use the
|
||||
.Xr clockctl 4
|
||||
device if present, thus making possible for non privileged users to
|
||||
set the system time. If
|
||||
set the system time.
|
||||
If
|
||||
.Xr clockctl 4
|
||||
is not present or not accessible, then
|
||||
.Fn settimeofday
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: issetugid.2,v 1.4 2002/02/08 01:28:18 ross Exp $
|
||||
.\" $NetBSD: issetugid.2,v 1.5 2002/10/01 18:10:44 wiz Exp $
|
||||
.\" OpenBSD: issetugid.2,v 1.7 1997/02/18 00:16:09 deraadt Exp
|
||||
.\" FreeBSD: src/lib/libc/sys/issetugid.2,v 1.5.2.2 1999/09/18 16:18:59 phantom Exp
|
||||
.\"
|
||||
@ -75,7 +75,8 @@ system call (or other library code that calls fork, such as
|
||||
It is assumed that a program that clears all privileges as it prepares
|
||||
to execute another will also reset the environment, hence the
|
||||
.Dq tainted
|
||||
status will not be passed on. This is important for programs such as
|
||||
status will not be passed on.
|
||||
This is important for programs such as
|
||||
.Xr su 1
|
||||
which begin setuid but need to be able to create an untainted process.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: kqueue.2,v 1.6 2002/09/25 00:55:16 wiz Exp $
|
||||
.\" $NetBSD: kqueue.2,v 1.7 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000 Jonathan Lemon
|
||||
.\" All rights reserved.
|
||||
@ -114,19 +114,22 @@ If
|
||||
is a
|
||||
.No non- Ns Dv NULL
|
||||
pointer, it specifies a maximum interval to wait
|
||||
for an event, which will be interpreted as a struct timespec. If
|
||||
for an event, which will be interpreted as a struct timespec.
|
||||
If
|
||||
.Fa timeout
|
||||
is a
|
||||
.Dv NULL
|
||||
pointer,
|
||||
.Fn kevent
|
||||
waits indefinitely. To effect a poll, the
|
||||
waits indefinitely.
|
||||
To effect a poll, the
|
||||
.Fa timeout
|
||||
argument should be
|
||||
.No non- Ns Dv NULL ,
|
||||
pointing to a zero-valued
|
||||
.Va timespec
|
||||
structure. The same array may be used for the
|
||||
structure.
|
||||
The same array may be used for the
|
||||
.Fa changelist
|
||||
and
|
||||
.Fa eventlist .
|
||||
@ -176,9 +179,10 @@ The
|
||||
field can contain the following values:
|
||||
.Bl -tag -width XXXEV_ONESHOT -offset indent
|
||||
.It EV_ADD
|
||||
Adds the event to the kqueue. Re-adding an existing event
|
||||
will modify the parameters of the original event, and not result
|
||||
in a duplicate entry. Adding an event automatically enables it,
|
||||
Adds the event to the kqueue.
|
||||
Re-adding an existing event will modify the parameters of the original
|
||||
event, and not result in a duplicate entry.
|
||||
Adding an event automatically enables it,
|
||||
unless overridden by the EV_DISABLE flag.
|
||||
.It EV_ENABLE
|
||||
Permit
|
||||
@ -187,20 +191,21 @@ to return the event if it is triggered.
|
||||
.It EV_DISABLE
|
||||
Disable the event so
|
||||
.Fn kevent
|
||||
will not return it. The filter itself is not disabled.
|
||||
will not return it.
|
||||
The filter itself is not disabled.
|
||||
.It EV_DELETE
|
||||
Removes the event from the kqueue. Events which are attached to
|
||||
file descriptors are automatically deleted on the last close of
|
||||
the descriptor.
|
||||
Removes the event from the kqueue.
|
||||
Events which are attached to file descriptors are automatically deleted
|
||||
on the last close of the descriptor.
|
||||
.It EV_ONESHOT
|
||||
Causes the event to return only the first occurrence of the filter
|
||||
being triggered. After the user retrieves the event from the kqueue,
|
||||
it is deleted.
|
||||
being triggered.
|
||||
After the user retrieves the event from the kqueue, it is deleted.
|
||||
.It EV_CLEAR
|
||||
After the event is retrieved by the user, its state is reset.
|
||||
This is useful for filters which report state transitions
|
||||
instead of the current state. Note that some filters may automatically
|
||||
set this flag internally.
|
||||
instead of the current state.
|
||||
Note that some filters may automatically set this flag internally.
|
||||
.It EV_EOF
|
||||
Filters may set this flag to indicate filter-specific EOF condition.
|
||||
.It EV_ERROR
|
||||
@ -314,8 +319,8 @@ returning.
|
||||
.El
|
||||
.It EVFILT_WRITE
|
||||
Takes a descriptor as the identifier, and returns whenever
|
||||
it is possible to write to the descriptor. For sockets, pipes,
|
||||
fifos, and ttys,
|
||||
it is possible to write to the descriptor.
|
||||
For sockets, pipes, fifos, and ttys,
|
||||
.Va data
|
||||
will contain the amount of space remaining in the write buffer.
|
||||
The filter will set EV_EOF when the reader disconnects, and for
|
||||
@ -349,7 +354,8 @@ Alternatively, a kevent structure may be initialized, with
|
||||
containing the descriptor of the kqueue, and the
|
||||
address of the kevent structure placed in the
|
||||
.Va aio_lio_opcode
|
||||
field of the AIO request. However, this approach will not work on
|
||||
field of the AIO request.
|
||||
However, this approach will not work on
|
||||
architectures with 64-bit pointers, and should be considered depreciated.
|
||||
..
|
||||
.It EVFILT_VNODE
|
||||
@ -400,7 +406,8 @@ or similar call.
|
||||
.It NOTE_TRACK
|
||||
Follow a process across
|
||||
.Fn fork
|
||||
calls. The parent process will return with NOTE_TRACK set in the
|
||||
calls.
|
||||
The parent process will return with NOTE_TRACK set in the
|
||||
.Va fflags
|
||||
field, while the child process will return with NOTE_CHILD set in
|
||||
.Va fflags
|
||||
@ -421,10 +428,11 @@ This coexists with the
|
||||
.Fn signal
|
||||
and
|
||||
.Fn sigaction
|
||||
facilities, and has a lower precedence. The filter will record
|
||||
facilities, and has a lower precedence.
|
||||
The filter will record
|
||||
all attempts to deliver a signal to a process, even if the signal has
|
||||
been marked as SIG_IGN. Event notification happens after normal
|
||||
signal delivery processing.
|
||||
been marked as SIG_IGN.
|
||||
Event notification happens after normal signal delivery processing.
|
||||
.Va data
|
||||
returns the number of times the signal has occurred since the last call to
|
||||
.Fn kevent .
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ktrace.2,v 1.12 2002/09/24 20:01:43 jdolecek Exp $
|
||||
.\" $NetBSD: ktrace.2,v 1.13 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -65,7 +65,8 @@ so the file must be truncated to zero length to discard
|
||||
previous trace data.
|
||||
If tracing points are being disabled (see KTROP_CLEAR below),
|
||||
.Ar tracefile
|
||||
may be NULL. If using
|
||||
may be NULL.
|
||||
If using
|
||||
.Fn fktrace
|
||||
then instead of passing a filename as
|
||||
.Ar tracefile ,
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: lfs_bmapv.2,v 1.4 2002/02/08 01:28:18 ross Exp $
|
||||
.\" $NetBSD: lfs_bmapv.2,v 1.5 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -68,7 +68,8 @@ argument contains the id of the filesystem to which the inodes and
|
||||
blocks belong.
|
||||
The
|
||||
.Fa blkiov
|
||||
argument is an array of BLOCK_INFO structures (see below). The
|
||||
argument is an array of BLOCK_INFO structures (see below).
|
||||
The
|
||||
.Fa blkcnt
|
||||
argument determines the size of the
|
||||
.Fa blkiov
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: lfs_markv.2,v 1.6 2002/07/10 23:37:03 wiz Exp $
|
||||
.\" $NetBSD: lfs_markv.2,v 1.7 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -52,8 +52,8 @@
|
||||
rewrites the blocks specified in
|
||||
.Fa blkiov
|
||||
to new disk locations, for the purposes of grouping them next to one
|
||||
another, or to move them out of a segment to clean it. All fields of
|
||||
the BLOCK_INFO structure must be filled in, except for
|
||||
another, or to move them out of a segment to clean it.
|
||||
All fields of the BLOCK_INFO structure must be filled in, except for
|
||||
.Fa bi_segcreate .
|
||||
If
|
||||
.Fa bi_daddr
|
||||
@ -80,7 +80,8 @@ is specified as LFS_UNUSED_LBN, the inode itself will be rewritten.
|
||||
.Pp
|
||||
The
|
||||
.Fa blkiov
|
||||
argument is an array of BLOCK_INFO structures (see below). The
|
||||
argument is an array of BLOCK_INFO structures (see below).
|
||||
The
|
||||
.Fa blkcnt
|
||||
argument determines the size of the
|
||||
.Fa blkiov
|
||||
@ -126,8 +127,8 @@ function call appeared in
|
||||
.Sh BUGS
|
||||
The functionality of
|
||||
.Fn lfs_markv
|
||||
does not really belong in user space. Among other things it could be
|
||||
used to work around the
|
||||
does not really belong in user space.
|
||||
Among other things it could be used to work around the
|
||||
SF_IMMUTABLE
|
||||
and
|
||||
SF_APPEND
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: link.2,v 1.17 2002/02/08 01:28:18 ross Exp $
|
||||
.\" $NetBSD: link.2,v 1.18 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -82,8 +82,8 @@ must be in the same file system.
|
||||
may not be a directory unless the caller is the super-user
|
||||
and the file system containing it supports linking to directories.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, a value of 0 is returned. Otherwise,
|
||||
a value of -1 is returned and
|
||||
Upon successful completion, a value of 0 is returned.
|
||||
Otherwise, a value of -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: lseek.2,v 1.17 2002/07/10 22:24:32 wiz Exp $
|
||||
.\" $NetBSD: lseek.2,v 1.18 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -95,12 +95,13 @@ bytes.
|
||||
The
|
||||
.Fn lseek
|
||||
function allows the file offset to be set beyond the end
|
||||
of the existing end-of-file of the file. If data is later written
|
||||
of the existing end-of-file of the file.
|
||||
If data is later written
|
||||
at this point, subsequent reads of the data in the gap return
|
||||
bytes of zeros (until data is actually written into the gap).
|
||||
.Pp
|
||||
Some devices are incapable of seeking. The value of the pointer
|
||||
associated with such a device is undefined.
|
||||
Some devices are incapable of seeking.
|
||||
The value of the pointer associated with such a device is undefined.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion,
|
||||
.Fn lseek
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: mincore.2,v 1.14 2002/02/08 01:28:19 ross Exp $
|
||||
.\" $NetBSD: mincore.2,v 1.15 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -50,18 +50,20 @@ The
|
||||
.Fn mincore
|
||||
system call
|
||||
allows a process to obtain information about whether pages are
|
||||
core resident. The status of the memory range is returned in the
|
||||
character-per-page array
|
||||
core resident.
|
||||
The status of the memory range is returned in the character-per-page array
|
||||
.Ar vec .
|
||||
If the page is resident, the least significant bit of the corresponding
|
||||
character in
|
||||
.Ar vec
|
||||
will be set. Other bits are reserved for additional information
|
||||
will be set.
|
||||
Other bits are reserved for additional information
|
||||
which future implementations may return.
|
||||
.Pp
|
||||
Note that the status of each page may change between the call to
|
||||
.Fn mincore
|
||||
and the return of the page status information. In order to guarantee
|
||||
and the return of the page status information.
|
||||
In order to guarantee
|
||||
that pages will remain in core, the address range must be locked with
|
||||
.Xr mlock 2 .
|
||||
.Sh RETURN VALUES
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: mkdir.2,v 1.16 2002/04/29 01:41:45 simonb Exp $
|
||||
.\" $NetBSD: mkdir.2,v 1.17 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -58,8 +58,8 @@ The directory's owner ID is set to the process's effective user ID.
|
||||
The directory's group ID is set to that of the parent directory in
|
||||
which it is created.
|
||||
.Sh RETURN VALUES
|
||||
A 0 return value indicates success. A -1 return value
|
||||
indicates an error, and an error code is stored in
|
||||
A 0 return value indicates success.
|
||||
A -1 return value indicates an error, and an error code is stored in
|
||||
.Va errno .
|
||||
.Sh ERRORS
|
||||
.Fn mkdir
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: mkfifo.2,v 1.14 2002/04/29 01:41:45 simonb Exp $
|
||||
.\" $NetBSD: mkfifo.2,v 1.15 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -60,8 +60,8 @@ The fifo's owner ID is set to the process's effective user ID.
|
||||
The fifo's group ID is set to that of the parent directory in
|
||||
which it is created.
|
||||
.Sh RETURN VALUES
|
||||
A 0 return value indicates success. A -1 return value
|
||||
indicates an error, and an error code is stored in
|
||||
A 0 return value indicates success.
|
||||
A -1 return value indicates an error, and an error code is stored in
|
||||
.Va errno .
|
||||
.Sh ERRORS
|
||||
.Fn mkfifo
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: mknod.2,v 1.13 2002/02/08 01:28:19 ross Exp $
|
||||
.\" $NetBSD: mknod.2,v 1.14 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -62,7 +62,8 @@ If
|
||||
indicates a block or character special file,
|
||||
.Fa dev
|
||||
is a configuration dependent specification of a character or block
|
||||
I/O device and the superblock of the device. If
|
||||
I/O device and the superblock of the device.
|
||||
If
|
||||
.Fa mode
|
||||
does not indicate a block special or character special device,
|
||||
.Fa dev
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: mlockall.2,v 1.8 2002/02/08 01:28:19 ross Exp $
|
||||
.\" $NetBSD: mlockall.2,v 1.9 2002/10/01 18:10:44 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -64,9 +64,9 @@ The following flags affect the behavior of
|
||||
Lock all pages currently mapped into the process's address space.
|
||||
.It Dv MCL_FUTURE
|
||||
Lock all pages mapped into the process's address space in the future,
|
||||
at the time the mapping is established. Note that this may cause
|
||||
future mappings to fail if those mappings cause resource limits to
|
||||
be exceeded.
|
||||
at the time the mapping is established.
|
||||
Note that this may cause future mappings to fail if those mappings
|
||||
cause resource limits to be exceeded.
|
||||
.El
|
||||
.Pp
|
||||
Since physical memory is a potentially scarce resource, processes are
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: mmap.2,v 1.25 2002/02/08 01:28:19 ross Exp $
|
||||
.\" $NetBSD: mmap.2,v 1.26 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -263,7 +263,8 @@ would exceed the offset maximum established in its open file description.
|
||||
.Sh BUGS
|
||||
The
|
||||
.Dv MAP_COPY
|
||||
flag is not implemented. The current
|
||||
flag is not implemented.
|
||||
The current
|
||||
.Dv MAP_COPY
|
||||
semantics are the same as those of the
|
||||
.Dv MAP_PRIVATE
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: msgctl.2,v 1.10 2002/02/08 01:28:19 ross Exp $
|
||||
.\" $NetBSD: msgctl.2,v 1.11 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995 Frank van der Linden
|
||||
.\" All rights reserved.
|
||||
@ -107,7 +107,8 @@ or
|
||||
in the data structure associated with the message queue.
|
||||
The value of
|
||||
.Va msg_qbytes
|
||||
can only be increased by the super-user. Values for
|
||||
can only be increased by the super-user.
|
||||
Values for
|
||||
.Va msg_qbytes
|
||||
that exceed the system limit
|
||||
.Pf ( Dv MSGMNB
|
||||
@ -117,8 +118,8 @@ are silently truncated to that limit.
|
||||
.It Dv IPC_RMID
|
||||
Remove the message queue specified by
|
||||
.Fa msqid
|
||||
and destroy the data associated with it. Only the super-user or a process
|
||||
with an effective uid equal to the
|
||||
and destroy the data associated with it.
|
||||
Only the super-user or a process with an effective uid equal to the
|
||||
.Va msg_perm.cuid
|
||||
or
|
||||
.Va msg_perm.uid
|
||||
@ -131,8 +132,7 @@ and
|
||||
.Xr msgrcv 2 )
|
||||
is determined by the
|
||||
.Va msg_perm.mode
|
||||
field in the same way as is
|
||||
done with files (see
|
||||
field in the same way as is done with files (see
|
||||
.Xr chmod 2 ) ,
|
||||
but the effective uid can match either the
|
||||
.Va msg_perm.cuid
|
||||
@ -144,8 +144,8 @@ effective gid can match either
|
||||
or
|
||||
.Va msg_perm.gid .
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, a value of 0 is returned. Otherwise, -1 is
|
||||
returned and the global variable
|
||||
Upon successful completion, a value of 0 is returned.
|
||||
Otherwise, -1 is returned and the global variable
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: msgrcv.2,v 1.13 2002/02/08 01:28:19 ross Exp $
|
||||
.\" $NetBSD: msgrcv.2,v 1.14 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995 Frank van der Linden
|
||||
.\" All rights reserved.
|
||||
@ -50,9 +50,10 @@ and places it into the user-defined structure pointed to by
|
||||
.Fa msgp .
|
||||
This structure must contain a first field of type
|
||||
.Sy long
|
||||
that will indicate the user-defined type of the message. The remaining
|
||||
fields will contain the contents of the message. The following is
|
||||
an example of what this user-defined structure might look like:
|
||||
that will indicate the user-defined type of the message.
|
||||
The remaining fields will contain the contents of the message.
|
||||
The following is an example of what this user-defined structure might
|
||||
look like:
|
||||
.Bd -literal
|
||||
struct mymsg {
|
||||
long mtype; /* message type */
|
||||
@ -72,23 +73,26 @@ has one of the following meanings:
|
||||
.Bl -bullet
|
||||
.It
|
||||
.Fa msgtyp
|
||||
is greater than 0. The first message of type
|
||||
is greater than 0.
|
||||
The first message of type
|
||||
.Fa msgtyp
|
||||
will be received.
|
||||
.It
|
||||
.Fa msgtyp
|
||||
is equal to 0. The first message on the queue will be received.
|
||||
is equal to 0.
|
||||
The first message on the queue will be received.
|
||||
.It
|
||||
.Fa msgtyp
|
||||
is less than 0. The first message of the lowest message type that is
|
||||
is less than 0.
|
||||
The first message of the lowest message type that is
|
||||
less than or equal to the absolute value of
|
||||
.Fa msgtyp
|
||||
will be received.
|
||||
.El
|
||||
.Pp
|
||||
.Fa msgsz
|
||||
specifies the maximum length of the requested message. If the received
|
||||
message has a length greater than
|
||||
specifies the maximum length of the requested message.
|
||||
If the received message has a length greater than
|
||||
.Fa msgsz
|
||||
it will be silently truncated if the
|
||||
.Dv MSG_NOERROR
|
||||
@ -104,7 +108,8 @@ depends on whether the
|
||||
.Dv IPC_NOWAIT
|
||||
flag is set in
|
||||
.Fa msgflg
|
||||
or not. If
|
||||
or not.
|
||||
If
|
||||
.Dv IPC_NOWAIT
|
||||
is set, then
|
||||
.Fn msgrcv
|
||||
@ -124,7 +129,8 @@ The message queue is removed, in which case -1 will be returned and
|
||||
set to
|
||||
.Er EIDRM .
|
||||
.It
|
||||
A signal is received and caught. -1 is returned and
|
||||
A signal is received and caught.
|
||||
-1 is returned and
|
||||
.Va errno
|
||||
is set to
|
||||
.Er EINTR .
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: msgsnd.2,v 1.11 2002/02/08 01:28:19 ross Exp $
|
||||
.\" $NetBSD: msgsnd.2,v 1.12 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995 Frank van der Linden
|
||||
.\" All rights reserved.
|
||||
@ -47,12 +47,13 @@ The
|
||||
function sends a message from the message queue specified in
|
||||
.Fa msqid .
|
||||
.Fa msgp
|
||||
points to a user-defined structure containing the message. This structure
|
||||
must contain a first field of type
|
||||
points to a user-defined structure containing the message.
|
||||
This structure must contain a first field of type
|
||||
.Sy long
|
||||
that will indicate the user-defined type of the message. The remaining
|
||||
fields will contain the contents of the message. The following is
|
||||
an example of what this user-defined structure might look like:
|
||||
that will indicate the user-defined type of the message.
|
||||
The remaining fields will contain the contents of the message.
|
||||
The following is an example of what this user-defined
|
||||
structure might look like:
|
||||
.Bd -literal
|
||||
struct mymsg {
|
||||
long mtype; /* message type */
|
||||
@ -82,7 +83,8 @@ If
|
||||
.Fa msgflg
|
||||
has
|
||||
.Dv IPC_NOWAIT
|
||||
mask set in it, the call will return immediately. If
|
||||
mask set in it, the call will return immediately.
|
||||
If
|
||||
.Fa msgflg
|
||||
does not have
|
||||
.Dv IPC_NOWAIT
|
||||
@ -97,7 +99,8 @@ The message queue is removed, in which case -1 will be returned and
|
||||
set to
|
||||
.Er EINVAL .
|
||||
.It
|
||||
The caller catches a signal. The call returns with
|
||||
The caller catches a signal.
|
||||
The call returns with
|
||||
.Va errno
|
||||
set to
|
||||
.Er EINTR .
|
||||
@ -117,7 +120,8 @@ is set to the pid of the calling process.
|
||||
is set to the current time.
|
||||
.El
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, 0 is returned. Otherwise, -1 is returned and
|
||||
Upon successful completion, 0 is returned.
|
||||
Otherwise, -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ntp_adjtime.2,v 1.3 2002/02/08 01:28:20 ross Exp $
|
||||
.\" $NetBSD: ntp_adjtime.2,v 1.4 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -60,8 +60,8 @@ are the kernel interface to the Network Time Protocol (NTP) daemon
|
||||
The
|
||||
.Fn ntp_adjtime
|
||||
function is used by the NTP daemon to adjust the system clock to an
|
||||
externally derived time. The time offset and related variables which
|
||||
are set by
|
||||
externally derived time.
|
||||
The time offset and related variables which are set by
|
||||
.Fn ntp_adjtime
|
||||
are used by
|
||||
.Xr hardclock 9
|
||||
@ -119,7 +119,8 @@ argument for
|
||||
.It Fa modes
|
||||
Defines what settings should be changed with the current
|
||||
.Fn ntp_adjtime
|
||||
call (write-only). Bitwise OR of the following:
|
||||
call (write-only).
|
||||
Bitwise OR of the following:
|
||||
.Bl -tag -width MOD_TIMECONST -compact -offset indent
|
||||
.It MOD_OFFSET
|
||||
set time offset
|
||||
@ -144,16 +145,19 @@ system time in small increments (read-write).
|
||||
.It Fa freq
|
||||
Frequency offset (scaled ppm) (read-write).
|
||||
.It Fa maxerror
|
||||
Maximum error (in microseconds). Initialized by an
|
||||
Maximum error (in microseconds).
|
||||
Initialized by an
|
||||
.Fn ntp_adjtime
|
||||
call, and increased by the kernel once each second to reflect the maximum
|
||||
error bound growth (read-write).
|
||||
.It Fa esterror
|
||||
Estimated error (in microseconds). Set and read by
|
||||
Estimated error (in microseconds).
|
||||
Set and read by
|
||||
.Fn ntp_adjtime ,
|
||||
but unused by the kernel (read-write).
|
||||
.It Fa status
|
||||
System clock status bits (read-write). Bitwise OR of the following:
|
||||
System clock status bits (read-write).
|
||||
Bitwise OR of the following:
|
||||
.Bl -tag -width STA_PPSJITTER -compact -offset indent
|
||||
.It STA_PLL
|
||||
Enable PLL updates (read-write).
|
||||
@ -187,15 +191,16 @@ PLL time constant, determines the bandwidth, or
|
||||
.Dq stiffness ,
|
||||
of the PLL (read-write).
|
||||
.It Fa precision
|
||||
Clock precision (in microseconds). In most cases the same
|
||||
as the kernel tick variable (see
|
||||
Clock precision (in microseconds).
|
||||
In most cases the same as the kernel tick variable (see
|
||||
.Xr hz 9 ) .
|
||||
If a precision clock counter or external time-keeping signal is available,
|
||||
it could be much lower (and depend on the state of the signal)
|
||||
(read-only).
|
||||
.It Fa tolerance
|
||||
Maximum frequency error, or tolerance of the CPU clock oscillator (scaled
|
||||
ppm). Ordinarily a property of the architecture, but could change under
|
||||
ppm).
|
||||
Ordinarily a property of the architecture, but could change under
|
||||
the influence of external time-keeping signals (read-only).
|
||||
.It Fa ppsfreq
|
||||
PPS frequency offset produced by the frequency median filter (scaled
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pipe.2,v 1.17 2002/02/08 01:28:20 ross Exp $
|
||||
.\" $NetBSD: pipe.2,v 1.18 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -83,8 +83,8 @@ Widowing a pipe is the only way to deliver end-of-file to a reader:
|
||||
after the reader consumes any buffered data, reading a widowed pipe
|
||||
returns a zero count.
|
||||
.Sh RETURN VALUES
|
||||
On successful creation of the pipe, zero is returned. Otherwise,
|
||||
a value of -1 is returned and the variable
|
||||
On successful creation of the pipe, zero is returned.
|
||||
Otherwise, a value of -1 is returned and the variable
|
||||
.Va errno
|
||||
set to indicate the
|
||||
error.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pmc_control.2,v 1.1 2002/08/07 04:51:12 briggs Exp $
|
||||
.\" $NetBSD: pmc_control.2,v 1.2 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2002 Wasabi Systems, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -93,18 +93,21 @@ all exited subprocesses of the current process.
|
||||
.Fn pmc_control
|
||||
manipulates the specified counter
|
||||
.Fa ctr
|
||||
in one of several fashions. The
|
||||
in one of several fashions.
|
||||
The
|
||||
.Fa op
|
||||
parameter determines the action taken by the kernel and also the interpretation of the
|
||||
.Fa argp
|
||||
parameter. The possible values for
|
||||
parameter.
|
||||
The possible values for
|
||||
.Fa op
|
||||
are:
|
||||
.Bl -tag -width width
|
||||
.It PMC_OP_START
|
||||
Starts the specified
|
||||
.Fa ctr
|
||||
running. It must be preceded by a call with
|
||||
running.
|
||||
It must be preceded by a call with
|
||||
.Em PMC_OP_CONFIGURE .
|
||||
.Fa argp
|
||||
is ignored in this case and may be
|
||||
@ -135,11 +138,13 @@ is a pointer to a
|
||||
is the event ID to be counted.
|
||||
.It Dv reset_value
|
||||
is a value to which the counter should be reset on overflow (if supported
|
||||
by the implementation). This is most useful when profiling (see
|
||||
by the implementation).
|
||||
This is most useful when profiling (see
|
||||
.Em PMC_OP_PROFSTART ,
|
||||
below). This value is defined to be the number of counter ticks before
|
||||
the next overflow. So, to get a profiling tick on every hundredth data
|
||||
cache miss, set the
|
||||
below).
|
||||
This value is defined to be the number of counter ticks before
|
||||
the next overflow.
|
||||
So, to get a profiling tick on every hundredth data cache miss, set the
|
||||
.Dv event_id
|
||||
to the proper value for
|
||||
.Dq dcache-miss
|
||||
@ -158,7 +163,8 @@ is a pointer to a
|
||||
.Em struct pmc_counter_cfg
|
||||
as in
|
||||
.Em PMC_OP_CONFIGURE ,
|
||||
above. This request allocates a kernel counter, which will fail if any
|
||||
above.
|
||||
This request allocates a kernel counter, which will fail if any
|
||||
process is using the requested counter.
|
||||
Not all implementations or counters may support this option.
|
||||
.It PMC_OP_PROFSTOP
|
||||
@ -170,8 +176,8 @@ is ignored in this case and may be
|
||||
.Dv NULL .
|
||||
.El
|
||||
.Sh RETURN VALUES
|
||||
A return value of 0 indicates that the call succeeded. Otherwise, -1 is
|
||||
returned and the global variable
|
||||
A return value of 0 indicates that the call succeeded.
|
||||
Otherwise, -1 is returned and the global variable
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: poll.2,v 1.14 2002/02/08 01:28:20 ross Exp $
|
||||
.\" $NetBSD: poll.2,v 1.15 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -55,7 +55,8 @@ The
|
||||
.Fa fds
|
||||
argument is a pointer to an array of pollfd structures as defined in
|
||||
.Aq Pa poll.h
|
||||
(shown below). The
|
||||
(shown below).
|
||||
The
|
||||
.Fa nfds
|
||||
argument determines the size of the
|
||||
.Fa fds
|
||||
@ -73,15 +74,18 @@ The fields of
|
||||
are as follows:
|
||||
.Bl -tag -width XXXrevents
|
||||
.It fd
|
||||
File descriptor to poll. If the value in
|
||||
File descriptor to poll.
|
||||
If the value in
|
||||
.Em fd
|
||||
is negative, the file descriptor is ignored and
|
||||
.Em revents
|
||||
is set to 0.
|
||||
.It events
|
||||
Events to poll for. (See below.)
|
||||
Events to poll for.
|
||||
(See below.)
|
||||
.It revents
|
||||
Events which may occur. (See below.)
|
||||
Events which may occur.
|
||||
(See below.)
|
||||
.El
|
||||
.Pp
|
||||
The event bitmasks in
|
||||
@ -104,28 +108,32 @@ Normal data may be written without blocking.
|
||||
.It POLLWRBAND
|
||||
Data with a non-zero priority may be written without blocking.
|
||||
.It POLLERR
|
||||
An exceptional condition has occurred on the device or socket. This
|
||||
flag is always checked, even if not present in the
|
||||
An exceptional condition has occurred on the device or socket.
|
||||
This flag is always checked, even if not present in the
|
||||
.Fa events
|
||||
bitmask.
|
||||
.It POLLHUP
|
||||
The device or socket has been disconnected. This flag is always
|
||||
The device or socket has been disconnected.
|
||||
This flag is always
|
||||
checked, even if not present in the
|
||||
.Fa events
|
||||
bitmask. Note that
|
||||
bitmask.
|
||||
Note that
|
||||
POLLHUP
|
||||
and
|
||||
POLLOUT
|
||||
should never be present in the
|
||||
.Fa revents
|
||||
bitmask at the same time. If the remote end of a socket is closed,
|
||||
bitmask at the same time.
|
||||
If the remote end of a socket is closed,
|
||||
.Fn poll
|
||||
returns a
|
||||
POLLIN
|
||||
event, rather than a
|
||||
POLLHUP.
|
||||
.It POLLNVAL
|
||||
The file descriptor is not open. This flag is always checked, even
|
||||
The file descriptor is not open.
|
||||
This flag is always checked, even
|
||||
if not present in the
|
||||
.Fa events
|
||||
bitmask.
|
||||
@ -134,9 +142,11 @@ bitmask.
|
||||
If
|
||||
.Fa timeout
|
||||
is neither zero nor INFTIM (-1), it specifies a maximum interval to
|
||||
wait for any file descriptor to become ready, in milliseconds. If
|
||||
wait for any file descriptor to become ready, in milliseconds.
|
||||
If
|
||||
.Fa timeout
|
||||
is INFTIM (-1), the poll blocks indefinitely. If
|
||||
is INFTIM (-1), the poll blocks indefinitely.
|
||||
If
|
||||
.Fa timeout
|
||||
is zero, then
|
||||
.Fn poll
|
||||
@ -144,7 +154,8 @@ will return without blocking.
|
||||
.Sh RETURN VALUES
|
||||
.Fn poll
|
||||
returns the number of descriptors that are ready for I/O, or -1 if an
|
||||
error occurred. If the time limit expires,
|
||||
error occurred.
|
||||
If the time limit expires,
|
||||
.Fn poll
|
||||
returns 0.
|
||||
If
|
||||
@ -158,15 +169,17 @@ array will be unmodified.
|
||||
This implementation differs from the historical one in that a given
|
||||
file descriptor may not cause
|
||||
.Fn poll
|
||||
to return with an error. In cases where this would have happened in
|
||||
the historical implementation (e.g. trying to poll a
|
||||
.Xr revoke 2 ed
|
||||
to return with an error.
|
||||
In cases where this would have happened in the historical implementation
|
||||
(e.g. trying to poll a
|
||||
.Xr revoke 2 Ns d
|
||||
descriptor), this implementation instead copies the
|
||||
.Fa events
|
||||
bitmask to the
|
||||
.Fa revents
|
||||
bitmask. Attempting to perform I/O on this descriptor will then
|
||||
return an error. This behaviour is believed to be more useful.
|
||||
bitmask.
|
||||
Attempting to perform I/O on this descriptor will then return an error.
|
||||
This behaviour is believed to be more useful.
|
||||
.Sh ERRORS
|
||||
An error return from
|
||||
.Fn poll
|
||||
@ -199,5 +212,5 @@ The distinction between some of the fields in the
|
||||
.Fa events
|
||||
and
|
||||
.Fa revents
|
||||
bitmasks is really not useful without STREAMS. The fields are
|
||||
defined for compatibility with existing software.
|
||||
bitmasks is really not useful without STREAMS.
|
||||
The fields are defined for compatibility with existing software.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: profil.2,v 1.9 2002/02/08 01:28:20 ross Exp $
|
||||
.\" $NetBSD: profil.2,v 1.10 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -108,7 +108,8 @@ returns 0.
|
||||
.It Pa /usr/lib/gcrt0.o
|
||||
profiling C run-time startup file
|
||||
.It Pa gmon.out
|
||||
conventional name for profiling output file. This may be different if the PROFDIR environment variable is set.
|
||||
conventional name for profiling output file.
|
||||
This may be different if the PROFDIR environment variable is set.
|
||||
.El
|
||||
.Sh ERRORS
|
||||
The following error may be reported:
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ptrace.2,v 1.19 2002/04/06 04:07:13 nathanw Exp $
|
||||
.\" $NetBSD: ptrace.2,v 1.20 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" This file is in the public domain.
|
||||
.Dd November 7, 1994
|
||||
@ -16,17 +16,20 @@
|
||||
.Fn ptrace "int request" "pid_t pid" "caddr_t addr" "int data"
|
||||
.Sh DESCRIPTION
|
||||
.Fn ptrace
|
||||
provides tracing and debugging facilities. It allows one process (the
|
||||
provides tracing and debugging facilities.
|
||||
It allows one process (the
|
||||
.Em tracing
|
||||
process) to control another (the
|
||||
.Em traced
|
||||
process). Most of the time, the traced process runs normally, but when
|
||||
process).
|
||||
Most of the time, the traced process runs normally, but when
|
||||
it receives a signal
|
||||
.Po
|
||||
see
|
||||
.Xr sigaction 2
|
||||
.Pc ,
|
||||
it stops. The tracing process is expected to notice this via
|
||||
it stops.
|
||||
The tracing process is expected to notice this via
|
||||
.Xr wait 2
|
||||
or the delivery of a
|
||||
.Dv SIGCHLD
|
||||
@ -49,8 +52,9 @@ can be:
|
||||
.Bl -tag -width 12n
|
||||
.It Dv PT_TRACE_ME
|
||||
This request is the only one used by the traced process; it declares
|
||||
that the process expects to be traced by its parent. All the other
|
||||
arguments are ignored. (If the parent process does not expect to trace
|
||||
that the process expects to be traced by its parent.
|
||||
All the other arguments are ignored.
|
||||
(If the parent process does not expect to trace
|
||||
the child, it will probably be rather confused by the results; once the
|
||||
traced process stops, it cannot be made to continue except via
|
||||
.Fn ptrace . )
|
||||
@ -67,22 +71,25 @@ be ignored.
|
||||
.It Dv PT_READ_I , Dv PT_READ_D
|
||||
These requests read a single
|
||||
.Li int
|
||||
of data from the traced process' address space. Traditionally,
|
||||
of data from the traced process' address space.
|
||||
Traditionally,
|
||||
.Fn ptrace
|
||||
has allowed for machines with distinct address spaces for instruction
|
||||
and data, which is why there are two requests: conceptually,
|
||||
.Dv PT_READ_I
|
||||
reads from the instruction space and
|
||||
.Dv PT_READ_D
|
||||
reads from the data space. In the current
|
||||
reads from the data space.
|
||||
In the current
|
||||
.Nx
|
||||
implementation, these
|
||||
two requests are completely identical. The
|
||||
two requests are completely identical.
|
||||
The
|
||||
.Fa addr
|
||||
argument specifies the address (in the traced process' virtual address
|
||||
space) at which the read is to be done. This address does not have to
|
||||
meet any alignment constraints. The value read is returned as the
|
||||
return value from
|
||||
space) at which the read is to be done.
|
||||
This address does not have to meet any alignment constraints.
|
||||
The value read is returned as the return value from
|
||||
.Eo \&
|
||||
.Fn ptrace
|
||||
.Ec .
|
||||
@ -91,13 +98,15 @@ These requests parallel
|
||||
.Dv PT_READ_I
|
||||
and
|
||||
.Dv PT_READ_D ,
|
||||
except that they write rather than read. The
|
||||
except that they write rather than read.
|
||||
The
|
||||
.Fa data
|
||||
argument supplies the value to be written.
|
||||
.\" .It Dv PT_READ_U
|
||||
.\" This request reads an
|
||||
.\" .Li int
|
||||
.\" from the traced process' user structure. The
|
||||
.\" from the traced process' user structure.
|
||||
.\" The
|
||||
.\" .Fa addr
|
||||
.\" argument specifies the location of the int relative to the base of the
|
||||
.\" user structure; it will usually be an integer value cast to
|
||||
@ -113,7 +122,8 @@ argument supplies the value to be written.
|
||||
.\" .Fa addr
|
||||
.\" must be aligned on an
|
||||
.\" .Li int
|
||||
.\" boundary. The value read is returned as the return value from
|
||||
.\" boundary.
|
||||
.\" The value read is returned as the return value from
|
||||
.\" .Eo \&
|
||||
.\" .Fn ptrace
|
||||
.\" .Ec .
|
||||
@ -148,19 +158,23 @@ had been used with
|
||||
given as the signal to be delivered.
|
||||
.It Dv PT_ATTACH
|
||||
This request allows a process to gain control of an otherwise unrelated
|
||||
process and begin tracing it. It does not need any cooperation from
|
||||
the to-be-traced process. In this case,
|
||||
process and begin tracing it.
|
||||
It does not need any cooperation from the to-be-traced process.
|
||||
In this case,
|
||||
.Fa pid
|
||||
specifies the process ID of the to-be-traced process, and the other two
|
||||
arguments are ignored. This request requires that the target process
|
||||
arguments are ignored.
|
||||
This request requires that the target process
|
||||
must have the same real UID as the tracing process, and that it must
|
||||
not be executing a setuid or setgid executable. (If the tracing
|
||||
process is running as root, these restrictions do not apply.) The
|
||||
tracing process will see the newly-traced process stop and may then
|
||||
not be executing a setuid or setgid executable.
|
||||
(If the tracing process is running as root,
|
||||
these restrictions do not apply.)
|
||||
The tracing process will see the newly-traced process stop and may then
|
||||
control it as if it had been traced all along.
|
||||
.Pp
|
||||
Three other restrictions apply to all tracing processes, even those
|
||||
running as root. First, no process may trace a system process.
|
||||
running as root.
|
||||
First, no process may trace a system process.
|
||||
Second, no process may trace the process running
|
||||
.Xr init 8 .
|
||||
Third, if a process has its root directory set with
|
||||
@ -197,9 +211,11 @@ take place,
|
||||
.Fa piod_addr
|
||||
is the buffer in the tracing process, and
|
||||
.Fa piod_len
|
||||
is the length of the I/O request. The
|
||||
is the length of the I/O request.
|
||||
The
|
||||
.Fa piod_op
|
||||
field specifies which type of I/O operation to perform. Possible
|
||||
field specifies which type of I/O operation to perform.
|
||||
Possible
|
||||
values are:
|
||||
.Bl -tag -width 18n
|
||||
.It PIOD_READ_D
|
||||
@ -218,8 +234,8 @@ argument to
|
||||
On return, the
|
||||
.Fa piod_len
|
||||
field in the I/O descriptor will be updated with the actual number of
|
||||
bytes transferred. If the requested I/O could not be successfully
|
||||
performed,
|
||||
bytes transferred.
|
||||
If the requested I/O could not be successfully performed,
|
||||
.Fn ptrace
|
||||
will return
|
||||
.Li -1
|
||||
@ -228,7 +244,8 @@ and set
|
||||
.El
|
||||
.Pp
|
||||
Additionally, the following requests exist but are
|
||||
not avaliable on all machine architectures. The file
|
||||
not avaliable on all machine architectures.
|
||||
The file
|
||||
.Aq Pa machine/ptrace.h
|
||||
lists which requests exist on a given machine.
|
||||
.Bl -tag -width 12n
|
||||
@ -311,12 +328,13 @@ pointed to by
|
||||
.\" .Li syscall_nargs
|
||||
.\" holds the number of arguments it expects, and
|
||||
.\" .Li syscall_args
|
||||
.\" holds the arguments themselves. (Only the first
|
||||
.\" holds the arguments themselves.
|
||||
.\" (Only the first
|
||||
.\" .Li syscall_nargs
|
||||
.\" elements of
|
||||
.\" .Li syscall_args
|
||||
.\" are guaranteed to be useful.) When a process stops on exit from a
|
||||
.\" syscall,
|
||||
.\" are guaranteed to be useful.)
|
||||
.\" When a process stops on exit from a syscall,
|
||||
.\" .Li syscall_num
|
||||
.\" is
|
||||
.\" .Eo \&
|
||||
@ -330,9 +348,11 @@ pointed to by
|
||||
.\" .Pc ,
|
||||
.\" or 0 if no error occurred, and
|
||||
.\" .Li syscall_rv
|
||||
.\" holds the return values. (If the syscall returns only one value, only
|
||||
.\" holds the return values.
|
||||
.\" (If the syscall returns only one value, only
|
||||
.\" .Li syscall_rv[0]
|
||||
.\" is useful.) The tracing process can modify any of these with
|
||||
.\" is useful.)
|
||||
.\" The tracing process can modify any of these with
|
||||
.\" .Dv PT_WRITE_U ;
|
||||
.\" only some modifications are useful.
|
||||
.\" .Pp
|
||||
@ -352,7 +372,8 @@ pointed to by
|
||||
.\" and
|
||||
.\" .Li syscall_rv
|
||||
.\" are passed back to the traced process directly (and therefore should be
|
||||
.\" filled in). If the syscall number is otherwise out of range, a dummy
|
||||
.\" filled in).
|
||||
.\" If the syscall number is otherwise out of range, a dummy
|
||||
.\" syscall which simply produces an
|
||||
.\" .Er ENOSYS
|
||||
.\" error is effectively performed.
|
||||
@ -372,8 +393,8 @@ 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.
|
||||
The possible errors are:
|
||||
.Bl -tag -width 4n
|
||||
.It Bq Er EAGAIN
|
||||
Process is currently exec'ing and cannot be traced.
|
||||
@ -412,8 +433,8 @@ was neither 0 nor a legal signal number.
|
||||
.Dv PT_GETFPREGS ,
|
||||
or
|
||||
.Dv PT_SETFPREGS
|
||||
was attempted on a process with no valid register set. (This is
|
||||
normally true only of system processes.)
|
||||
was attempted on a process with no valid register set.
|
||||
(This is normally true only of system processes.)
|
||||
.El
|
||||
.It Bq Er EBUSY
|
||||
.Bl -bullet -compact
|
||||
@ -448,8 +469,9 @@ above.
|
||||
.Sh BUGS
|
||||
On the SPARC, the PC is set to the provided PC value for
|
||||
.Dv PT_CONTINUE
|
||||
and similar calls, but the NPC is set willy-nilly to 4 greater than the
|
||||
PC value. Using
|
||||
and similar calls,
|
||||
but the NPC is set willy-nilly to 4 greater than the PC value.
|
||||
Using
|
||||
.Dv PT_GETREGS
|
||||
and
|
||||
.Dv PT_SETREGS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: rasctl.2,v 1.4 2002/09/15 23:05:13 gmcgarry Exp $
|
||||
.\" $NetBSD: rasctl.2,v 1.5 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -49,9 +49,10 @@
|
||||
.Fn rasctl "void *addr" "size_t len" "int op"
|
||||
.Sh DESCRIPTION
|
||||
Restartable atomic sequences are code sequences which are guaranteed
|
||||
to execute without preemption. This property is assured by the kernel
|
||||
by re-executing a preempted sequence from the start. This
|
||||
functionality enables applications to build atomic sequences which,
|
||||
to execute without preemption.
|
||||
This property is assured by the kernel
|
||||
by re-executing a preempted sequence from the start.
|
||||
This functionality enables applications to build atomic sequences which,
|
||||
when executed to completion, will have executed atomically.
|
||||
Restartable atomic sequences are intended to be used on systems that
|
||||
do not have hardware support for low-overhead atomic primitives.
|
||||
@ -71,7 +72,8 @@ As the process execution can be rolled-back, the code in the sequence
|
||||
should have no side effects other than a final store at
|
||||
.Fa addr Ns + Ns Fa len Ns \-1 .
|
||||
The kernel does not guarantee that the sequences are successfully
|
||||
restartable. It assumes that the application knows what it is doing.
|
||||
restartable.
|
||||
It assumes that the application knows what it is doing.
|
||||
Restartable atomic sequences should adhere to the following guidelines:
|
||||
.Pp
|
||||
.Bl -bullet -compact
|
||||
@ -86,14 +88,15 @@ not invoke any functions or system calls.
|
||||
Restartable atomic sequences are inherited from the parent by the
|
||||
child during the
|
||||
.Xr fork 2
|
||||
operation. Restartable atomic sequences for a process are removed
|
||||
during
|
||||
operation.
|
||||
Restartable atomic sequences for a process are removed during
|
||||
.Xr exec 3 .
|
||||
.Pp
|
||||
The operations that can be applied to a restartable atomic sequence
|
||||
are specified by the
|
||||
.Fa op
|
||||
argument. Possible operations are:
|
||||
argument.
|
||||
Possible operations are:
|
||||
.Pp
|
||||
.Bl -tag -compact -width RAS_PURGE_ALLXXX
|
||||
.It RAS_INSTALL
|
||||
@ -107,9 +110,9 @@ Remove all registers sequences for this process.
|
||||
The RAS_PURGE and RAS_PURGE_ALL operations should be considered to have
|
||||
undefined behaviour if there are any other runnable threads in the
|
||||
address space which might be executing within the restartable atomic
|
||||
sequence(s) at the time of the purge. The caller must be responsible
|
||||
for ensuring that there is some form of coordination with other threads
|
||||
to prevent unexpected behaviour.
|
||||
sequence(s) at the time of the purge.
|
||||
The caller must be responsible for ensuring that there is some form of
|
||||
coordination with other threads to prevent unexpected behaviour.
|
||||
.Pp
|
||||
To preserve the atomicity of sequences, the kernel attempts to protect
|
||||
the sequences from alteration by the
|
||||
@ -118,7 +121,8 @@ facility.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion,
|
||||
.Fn rasctl
|
||||
returns zero. Otherwise, \-1 is returned and
|
||||
returns zero.
|
||||
Otherwise, \-1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
@ -128,7 +132,8 @@ function will fail if:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EINVAL
|
||||
Invalid input was supplied, such as an invalid operation, an invalid
|
||||
address, or an invalid length. A process may have a finite number of
|
||||
address, or an invalid length.
|
||||
A process may have a finite number of
|
||||
atomic sequences that is defined at compile time.
|
||||
.It Bq Er EOPNOTSUPP
|
||||
Restartable atomic sequences are not supported by the kernel.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: read.2,v 1.19 2002/07/10 14:37:17 yamt Exp $
|
||||
.\" $NetBSD: read.2,v 1.20 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -111,8 +111,8 @@ Upon return from
|
||||
the pointer is incremented by the number of bytes actually read.
|
||||
.Pp
|
||||
Objects that are not capable of seeking always read from the current
|
||||
position. The value of the pointer associated with such an
|
||||
object is undefined.
|
||||
position.
|
||||
The value of the pointer associated with such an object is undefined.
|
||||
.Pp
|
||||
Upon successful completion,
|
||||
.Fn read ,
|
||||
@ -126,8 +126,8 @@ the descriptor references a normal file that has that many bytes left
|
||||
before the end-of-file, but in no other case.
|
||||
.Sh RETURN VALUES
|
||||
If successful, the
|
||||
number of bytes actually read is returned. Upon reading end-of-file,
|
||||
zero is returned.
|
||||
number of bytes actually read is returned.
|
||||
Upon reading end-of-file, zero is returned.
|
||||
Otherwise, a -1 is returned and the global variable
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: reboot.2,v 1.15 2002/08/17 17:52:54 yamt Exp $
|
||||
.\" $NetBSD: reboot.2,v 1.16 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -140,7 +140,8 @@ An automatic consistency check of the disks is normally performed
|
||||
.It Dv RB_STRING
|
||||
.Fa bootstr
|
||||
is a string passed to the firmware on the machine, if possible, if this
|
||||
option is set. Currently this only implemented on the sparc and the sun3.
|
||||
option is set.
|
||||
Currently this only implemented on the sparc and the sun3.
|
||||
.El
|
||||
.Sh RETURN VALUES
|
||||
If successful, this call never returns.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: rename.2,v 1.16 2002/02/08 01:28:21 ross Exp $
|
||||
.\" $NetBSD: rename.2,v 1.17 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -142,9 +142,9 @@ The link named by
|
||||
.Fa to
|
||||
and the file named by
|
||||
.Fa from
|
||||
are on different logical devices (file systems). Note that this error
|
||||
code will not be returned if the implementation permits cross-device
|
||||
links.
|
||||
are on different logical devices (file systems).
|
||||
Note that this error code will not be returned if the implementation
|
||||
permits cross-device links.
|
||||
.It Bq Er ENOSPC
|
||||
The directory in which the entry for the new name is being placed
|
||||
cannot be extended because there is no space left on the file
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: revoke.2,v 1.8 2002/02/08 01:28:21 ross Exp $
|
||||
.\" $NetBSD: revoke.2,v 1.9 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -72,8 +72,8 @@ Access to a file may be revoked only by its owner or the super user.
|
||||
is normally used to prepare a terminal device for a new login session,
|
||||
preventing any access by a previous user of the terminal.
|
||||
.Sh RETURN VALUES
|
||||
A 0 value indicates that the call succeeded. A \-1 return value
|
||||
indicates an error occurred and
|
||||
A 0 value indicates that the call succeeded.
|
||||
A \-1 return value indicates an error occurred and
|
||||
.Va errno
|
||||
is set to indicate the reason.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: semctl.2,v 1.11 2002/02/08 01:28:21 ross Exp $
|
||||
.\" $NetBSD: semctl.2,v 1.12 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995 Frank van der Linden
|
||||
.\" All rights reserved.
|
||||
@ -154,8 +154,8 @@ in the data structure associated with the message queue.
|
||||
.It Dv IPC_RMID
|
||||
Remove the semaphores associated with
|
||||
.Fa semid
|
||||
from the system and destroy the data structures associated with it. Only the
|
||||
super-user or a process with an effective uid equal to the
|
||||
from the system and destroy the data structures associated with it.
|
||||
Only the super-user or a process with an effective uid equal to the
|
||||
.Va sem_perm.cuid
|
||||
or
|
||||
.Va sem_perm.uid
|
||||
@ -187,10 +187,11 @@ and
|
||||
.Dv GETZCNT
|
||||
operations,
|
||||
.Fn semctl
|
||||
returns one of the values described above if successful. All other operations
|
||||
will make
|
||||
returns one of the values described above if successful.
|
||||
All other operations will make
|
||||
.Fn semctl
|
||||
return 0 if no errors occur. Otherwise -1 is returned and
|
||||
return 0 if no errors occur.
|
||||
Otherwise -1 is returned and
|
||||
.Va errno
|
||||
set to reflect the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: semget.2,v 1.12 2002/02/08 01:28:21 ross Exp $
|
||||
.\" $NetBSD: semget.2,v 1.13 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995 Frank van der Linden
|
||||
.\" All rights reserved.
|
||||
@ -94,8 +94,8 @@ is set to 0.
|
||||
.El
|
||||
.Sh RETURN VALUES
|
||||
.Fn semget
|
||||
returns a non-negative semaphore identifier if successful. Otherwise, -1
|
||||
is returned and
|
||||
returns a non-negative semaphore identifier if successful.
|
||||
Otherwise, -1 is returned and
|
||||
.Va errno
|
||||
is set to reflect the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: semop.2,v 1.11 2002/03/05 21:29:32 tv Exp $
|
||||
.\" $NetBSD: semop.2,v 1.12 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995 Frank van der Linden
|
||||
.\" All rights reserved.
|
||||
@ -43,13 +43,14 @@
|
||||
.Fn semop "int semid" "struct sembuf *sops" "size_t nsops"
|
||||
.Sh DESCRIPTION
|
||||
.Fn semop
|
||||
provides a number of atomic operations on a set of semaphores. The semaphore
|
||||
set is specified by
|
||||
provides a number of atomic operations on a set of semaphores.
|
||||
The semaphore set is specified by
|
||||
.Fa semid ,
|
||||
.Fa sops
|
||||
is an array of semaphore operations, and
|
||||
.Fa nsops
|
||||
is the number of operations in this array. The
|
||||
is the number of operations in this array.
|
||||
The
|
||||
.Va sembuf
|
||||
structures in the array contain the following members:
|
||||
.Bd -literal
|
||||
@ -70,22 +71,26 @@ determines the action taken in the following way:
|
||||
.Bl -bullet
|
||||
.It
|
||||
.Va sem_op
|
||||
is less than 0. The current process is blocked until the value of the
|
||||
is less than 0.
|
||||
The current process is blocked until the value of the
|
||||
semaphore is greater than or equal to the absolute value of
|
||||
.Va sem_op .
|
||||
The absolute value of
|
||||
.Va sem_op
|
||||
is then subtracted from the value of the semaphore, and the calling
|
||||
process continues. Negative values of
|
||||
process continues.
|
||||
Negative values of
|
||||
.Va sem_op
|
||||
are thus used to enter critical regions.
|
||||
.It
|
||||
.Va sem_op
|
||||
is greater than 0. Its value is added to the value of the specified
|
||||
semaphore. This is used to leave critical regions.
|
||||
is greater than 0.
|
||||
Its value is added to the value of the specified semaphore.
|
||||
This is used to leave critical regions.
|
||||
.It
|
||||
.Va sem_op
|
||||
is equal to 0. The calling process is blocked until the value of the
|
||||
is equal to 0.
|
||||
The calling process is blocked until the value of the
|
||||
specified semaphore reaches 0.
|
||||
.El
|
||||
.Pp
|
||||
@ -104,14 +109,14 @@ to
|
||||
.Er EAGAIN .
|
||||
.It SEM_UNDO
|
||||
Keep track of the changes that this call makes to the value of a semaphore,
|
||||
so that they can be undone when the calling process terminates. This is
|
||||
useful to prevent other processes waiting on a semaphore to block forever,
|
||||
should the process that has the semaphore locked terminate in a critical
|
||||
section.
|
||||
so that they can be undone when the calling process terminates.
|
||||
This is useful to prevent other processes waiting on a semaphore to block
|
||||
forever, should the process that has the semaphore locked terminate in a
|
||||
critical section.
|
||||
.El
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, a value of 0 is returned. Otherwise, -1 is
|
||||
returned and the global variable
|
||||
Upon successful completion, a value of 0 is returned.
|
||||
Otherwise, -1 is returned and the global variable
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
@ -129,7 +134,8 @@ The calling process has no permission to access the specified semaphore set.
|
||||
.It Bq Er E2BIG
|
||||
The value of
|
||||
.Fa nsops
|
||||
is too big. The maximum is defined as
|
||||
is too big.
|
||||
The maximum is defined as
|
||||
.Dv MAX_SOPS
|
||||
in
|
||||
.Aq Pa sys/sem.h .
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: setregid.2,v 1.17 2002/02/08 01:28:22 ross Exp $
|
||||
.\" $NetBSD: setregid.2,v 1.18 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -89,9 +89,9 @@ and
|
||||
.Ef
|
||||
.Pp
|
||||
The real and effective group ID's of the
|
||||
current process are set according to the arguments. If the real group ID
|
||||
is changed, the saved group ID is changed to the new value of the effective
|
||||
group ID.
|
||||
current process are set according to the arguments.
|
||||
If the real group ID is changed, the saved group ID is changed to the
|
||||
new value of the effective group ID.
|
||||
.Pp
|
||||
If
|
||||
.Fa rgid
|
||||
@ -107,7 +107,8 @@ The
|
||||
.Fn setregid
|
||||
function has been used to swap the real and effective group
|
||||
IDs in set-group-ID programs to temporarily relinquish the set-group-ID
|
||||
value. This purpose is now better served by the use of the
|
||||
value.
|
||||
This purpose is now better served by the use of the
|
||||
.Fn setegid
|
||||
function (see
|
||||
.Xr setgid 2 ) .
|
||||
@ -121,8 +122,8 @@ the
|
||||
.Fn setegid
|
||||
function.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, a value of 0 is returned. Otherwise,
|
||||
a value of -1 is returned and
|
||||
Upon successful completion, a value of 0 is returned.
|
||||
Otherwise, a value of -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: setreuid.2,v 1.17 2002/02/08 01:28:22 ross Exp $
|
||||
.\" $NetBSD: setreuid.2,v 1.18 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -89,9 +89,9 @@ and
|
||||
.Ef
|
||||
.Pp
|
||||
The real and effective user ID's of the
|
||||
current process are set according to the arguments. If the real user ID
|
||||
is changed, the saved user ID is changed to the new value of the effective
|
||||
user ID.
|
||||
current process are set according to the arguments.
|
||||
If the real user ID is changed, the saved user ID is changed to the new
|
||||
value of the effective user ID.
|
||||
.Pp
|
||||
If
|
||||
.Fa ruid
|
||||
@ -107,7 +107,8 @@ The
|
||||
.Fn setreuid
|
||||
function has been used to swap the real and effective user
|
||||
IDs in set-user-ID programs to temporarily relinquish the set-user-ID
|
||||
value. This purpose is now better served by the use of the
|
||||
value.
|
||||
This purpose is now better served by the use of the
|
||||
.Fn seteuid
|
||||
function (see
|
||||
.Xr setuid 2 ) .
|
||||
@ -121,8 +122,8 @@ the
|
||||
.Fn seteuid
|
||||
function.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, a value of 0 is returned. Otherwise,
|
||||
a value of -1 is returned and
|
||||
Upon successful completion, a value of 0 is returned.
|
||||
Otherwise, a value of -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: shmat.2,v 1.13 2002/06/16 22:39:32 wiz Exp $
|
||||
.\" $NetBSD: shmat.2,v 1.14 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995 Frank van der Linden
|
||||
.\" All rights reserved.
|
||||
@ -48,14 +48,16 @@
|
||||
.Fn shmat
|
||||
maps the shared memory segment associated with the shared memory identifier
|
||||
.Fa shmid
|
||||
into the address space of the calling process. The address at which the
|
||||
segment is mapped is determined by the
|
||||
into the address space of the calling process.
|
||||
The address at which the segment is mapped is determined by the
|
||||
.Fa shmaddr
|
||||
parameter. If it is equal to 0, the system will pick an address itself.
|
||||
parameter.
|
||||
If it is equal to 0, the system will pick an address itself.
|
||||
Otherwise, an attempt is made to map the shared memory segment at the
|
||||
address
|
||||
.Fa shmaddr
|
||||
specifies. If
|
||||
specifies.
|
||||
If
|
||||
.Dv SHM_RND
|
||||
is set in
|
||||
.Fa shmflg ,
|
||||
@ -78,7 +80,8 @@ from the calling process' address space.
|
||||
.Fa shmaddr
|
||||
must be a value returned by a prior
|
||||
.Fn shmat
|
||||
call. A shared memory segment will remain in existence until it is
|
||||
call.
|
||||
A shared memory segment will remain in existence until it is
|
||||
removed by a call to
|
||||
.Xr shmctl 2
|
||||
with the
|
||||
@ -89,8 +92,8 @@ command.
|
||||
returns the address at which the shared memory segment has been mapped into
|
||||
the calling process' address space when successful,
|
||||
.Fn shmdt
|
||||
returns 0 on successful completion. Otherwise, a value of -1 is returned,
|
||||
and the global variable
|
||||
returns 0 on successful completion.
|
||||
Otherwise, a value of -1 is returned, and the global variable
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: sigpending.2,v 1.9 2002/02/08 01:28:22 ross Exp $
|
||||
.\" $NetBSD: sigpending.2,v 1.10 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -58,8 +58,8 @@ Signals may be pending because they are currently masked,
|
||||
or they are in transition before delivery (although the latter case is not
|
||||
normally detectable).
|
||||
.Sh RETURN VALUES
|
||||
A 0 value indicates that the call succeeded. A \-1 return value
|
||||
indicates an error occurred and
|
||||
A 0 value indicates that the call succeeded.
|
||||
A \-1 return value indicates an error occurred and
|
||||
.Va errno
|
||||
is set to indicate the reason.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: sigprocmask.2,v 1.12 2002/02/08 01:28:22 ross Exp $
|
||||
.\" $NetBSD: sigprocmask.2,v 1.13 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -97,8 +97,8 @@ or
|
||||
.Dv SIGSTOP
|
||||
to be blocked.
|
||||
.Sh RETURN VALUES
|
||||
A 0 value indicates that the call succeeded. A -1 return value
|
||||
indicates an error occurred and
|
||||
A 0 value indicates that the call succeeded.
|
||||
A -1 return value indicates an error occurred and
|
||||
.Va errno
|
||||
is set to indicate the reason.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: socket.2,v 1.22 2002/02/08 01:28:22 ross Exp $
|
||||
.\" $NetBSD: socket.2,v 1.23 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -70,8 +70,8 @@ PF_APPLETALK AppleTalk protocols
|
||||
.Pp
|
||||
The socket has the indicated
|
||||
.Fa type ,
|
||||
which specifies the semantics of communication. Currently
|
||||
defined types are:
|
||||
which specifies the semantics of communication.
|
||||
Currently defined types are:
|
||||
.Pp
|
||||
.Bd -literal -offset indent -compact
|
||||
SOCK_STREAM
|
||||
@ -113,9 +113,10 @@ The
|
||||
.Fa protocol
|
||||
specifies a particular protocol to be used with the socket.
|
||||
Normally only a single protocol exists to support a particular
|
||||
socket type within a given protocol family. However, it is possible
|
||||
that many protocols may exist, in which case a particular protocol
|
||||
must be specified in this manner. The protocol number to use is
|
||||
socket type within a given protocol family.
|
||||
However, it is possible that many protocols may exist, in which case
|
||||
a particular protocol must be specified in this manner.
|
||||
The protocol number to use is
|
||||
particular to the \*(lqcommunication domain\*(rq in which communication
|
||||
is to take place; see
|
||||
.Xr protocols 5 .
|
||||
@ -123,12 +124,15 @@ is to take place; see
|
||||
Sockets of type
|
||||
.Dv SOCK_STREAM
|
||||
are full-duplex byte streams, similar
|
||||
to pipes. A stream socket must be in a
|
||||
to pipes.
|
||||
A stream socket must be in a
|
||||
.Em connected
|
||||
state before any data may be sent or received
|
||||
on it. A connection to another socket is created with a
|
||||
on it.
|
||||
A connection to another socket is created with a
|
||||
.Xr connect 2
|
||||
call. Once connected, data may be transferred using
|
||||
call.
|
||||
Once connected, data may be transferred using
|
||||
.Xr read 2
|
||||
and
|
||||
.Xr write 2
|
||||
@ -136,7 +140,8 @@ calls or some variant of the
|
||||
.Xr send 2
|
||||
and
|
||||
.Xr recv 2
|
||||
calls. When a session has been completed a
|
||||
calls.
|
||||
When a session has been completed a
|
||||
.Xr close 2
|
||||
may be performed.
|
||||
Out-of-band data may also be transmitted as described in
|
||||
@ -147,7 +152,8 @@ and received as described in
|
||||
The communications protocols used to implement a
|
||||
.Dv SOCK_STREAM
|
||||
ensure that data
|
||||
is not lost or duplicated. If a piece of data for which the
|
||||
is not lost or duplicated.
|
||||
If a piece of data for which the
|
||||
peer protocol has buffer space cannot be successfully transmitted
|
||||
within a reasonable length of time, then
|
||||
the connection is considered broken and calls
|
||||
@ -174,8 +180,8 @@ which do not handle the signal, to exit.
|
||||
sockets employ the same system calls
|
||||
as
|
||||
.Dv SOCK_STREAM
|
||||
sockets. The only difference
|
||||
is that
|
||||
sockets.
|
||||
The only difference is that
|
||||
.Xr read 2
|
||||
calls will return only the amount of data requested,
|
||||
and any remaining in the arriving packet will be discarded.
|
||||
@ -186,7 +192,8 @@ and
|
||||
sockets allow sending of datagrams to correspondents
|
||||
named in
|
||||
.Xr send 2
|
||||
calls. Datagrams are generally received with
|
||||
calls.
|
||||
Datagrams are generally received with
|
||||
.Xr recvfrom 2 ,
|
||||
which returns the next datagram with its return address.
|
||||
.Pp
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: stat.2,v 1.28 2002/08/02 08:08:26 soren Exp $
|
||||
.\" $NetBSD: stat.2,v 1.29 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -255,8 +255,8 @@ does not exist.
|
||||
.It Bq Er EIO
|
||||
An I/O error occurred while reading from or writing to the file system.
|
||||
.It Bq Er EBADF
|
||||
A badly formed v-node was encountered. This can happen if a file system
|
||||
information node is incorrect.
|
||||
A badly formed v-node was encountered.
|
||||
This can happen if a file system information node is incorrect.
|
||||
.El
|
||||
.Pp
|
||||
.Bl -tag -width Er
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: swapctl.2,v 1.23 2002/02/08 01:28:22 ross Exp $
|
||||
.\" $NetBSD: swapctl.2,v 1.24 2002/10/01 18:10:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997 Matthew R. Green
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
@ -53,7 +53,8 @@ configuration.
|
||||
.Pp
|
||||
The
|
||||
.Fa cmd
|
||||
parameter specifies the operation to be performed. The
|
||||
parameter specifies the operation to be performed.
|
||||
The
|
||||
.Fa arg
|
||||
and
|
||||
.Fa misc
|
||||
@ -66,7 +67,8 @@ If
|
||||
.Fa cmd
|
||||
is
|
||||
.Dv SWAP_NSWAP ,
|
||||
the current number of swap devices in the system is returned. The
|
||||
the current number of swap devices in the system is returned.
|
||||
The
|
||||
.Fa arg
|
||||
and
|
||||
.Fa misc
|
||||
@ -78,9 +80,11 @@ is
|
||||
.Dv SWAP_STATS ,
|
||||
the current statistics for swap devices are returned in the
|
||||
.Fa arg
|
||||
parameter. No more than
|
||||
parameter.
|
||||
No more than
|
||||
.Fa misc
|
||||
swap devices are returned. The
|
||||
swap devices are returned.
|
||||
The
|
||||
.Fa arg
|
||||
parameter should point to an array of at least
|
||||
.Fa misc
|
||||
@ -157,14 +161,15 @@ parameter points to a dev_t, which is filled in by the current dump device.
|
||||
.El
|
||||
.Pp
|
||||
When swapping is enabled on a block device, the first portion of the disk is
|
||||
left unused to prevent any disklabel present from being overwritten. This
|
||||
space is allocated from the swap device when the
|
||||
left unused to prevent any disklabel present from being overwritten.
|
||||
This space is allocated from the swap device when the
|
||||
.Dv SWAP_ON
|
||||
command is used.
|
||||
.Pp
|
||||
The priority of a swap device can be used to fill faster swap devices before
|
||||
slower ones. A priority of 0 is the highest, with larger numbers having
|
||||
lower priority. For a fuller discussion on swap priority, see the
|
||||
slower ones.
|
||||
A priority of 0 is the highest, with larger numbers having lower priority.
|
||||
For a fuller discussion on swap priority, see the
|
||||
.Sx SWAP PRIORITY
|
||||
section in
|
||||
.Xr swapctl 8 .
|
||||
@ -176,9 +181,11 @@ parameter is
|
||||
or
|
||||
.Dv SWAP_STATS ,
|
||||
.Fn swapctl
|
||||
returns the number of swap devices, if successful. The
|
||||
returns the number of swap devices, if successful.
|
||||
The
|
||||
.Dv SWAP_NSWAP
|
||||
command is always successful. Otherwise it returns 0 on success and -1
|
||||
command is always successful.
|
||||
Otherwise it returns 0 on success and -1
|
||||
on failure, setting the global variable
|
||||
.Va errno
|
||||
to indicate the error.
|
||||
@ -195,7 +202,8 @@ characters, or an entire path name exceeded
|
||||
.Dv PATH_MAX
|
||||
characters.
|
||||
.It Bq Er ENOENT
|
||||
The named device does not exist. For the
|
||||
The named device does not exist.
|
||||
For the
|
||||
.Dv SWAP_CTL
|
||||
command, the named device is not currently enabled for swapping.
|
||||
.It Bq Er EACCES
|
||||
@ -243,7 +251,8 @@ when the header file was also moved from
|
||||
to its current location in
|
||||
.Pa \*[Lt]sys/swap.h\*[Gt] .
|
||||
.Sh AUTHORS
|
||||
The current swap system was designed and implemented by Matthew Green
|
||||
\*[Lt]mrg@eterna.com.au\*[Gt], with help from Paul Kranenburg \*[Lt]pk@NetBSD.ORG\*[Gt]
|
||||
and Leo Weppelman \*[Lt]leo@NetBSD.ORG\*[Gt], and insights from Jason R. Thorpe
|
||||
\*[Lt]thorpej@NetBSD.ORG\*[Gt].
|
||||
The current swap system was designed and implemented by
|
||||
Matthew Green \*[Lt]mrg@eterna.com.au\*[Gt],
|
||||
with help from Paul Kranenburg \*[Lt]pk@NetBSD.ORG\*[Gt]
|
||||
and Leo Weppelman \*[Lt]leo@NetBSD.ORG\*[Gt],
|
||||
and insights from Jason R. Thorpe \*[Lt]thorpej@NetBSD.ORG\*[Gt].
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: swapon.3,v 1.10 2002/02/07 07:00:33 ross Exp $
|
||||
.\" $NetBSD: swapon.3,v 1.11 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -55,9 +55,10 @@ has been obsoleted by
|
||||
makes the block device
|
||||
.Fa special
|
||||
available to the system for
|
||||
allocation for paging and swapping. The names of potentially
|
||||
available devices are known to the system and defined at system
|
||||
configuration time. The size of the swap area on
|
||||
allocation for paging and swapping.
|
||||
The names of potentially available devices are known to the system
|
||||
and defined at system configuration time.
|
||||
The size of the swap area on
|
||||
.Fa special
|
||||
is calculated at the time the device is first made available
|
||||
for swapping.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: sync.2,v 1.11 2002/02/08 01:28:23 ross Exp $
|
||||
.\" $NetBSD: sync.2,v 1.12 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -50,13 +50,15 @@ The
|
||||
.Fn sync
|
||||
function forces a write of dirty (modified) buffers
|
||||
in the block buffer cache out
|
||||
to disk. The kernel keeps this information in core to reduce
|
||||
to disk.
|
||||
The kernel keeps this information in core to reduce
|
||||
the number of disk I/O transfers required by the system.
|
||||
As information in the cache is lost after a system crash,
|
||||
kernel thread
|
||||
.Nm ioflush
|
||||
ensures that dirty buffers are synced to disk
|
||||
eventually. By default, a dirty buffer is synced after 30 seconds,
|
||||
eventually.
|
||||
By default, a dirty buffer is synced after 30 seconds,
|
||||
but some filesystems exploit
|
||||
.Nm ioflush
|
||||
features to sync directory data and metadata faster
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: sysarch.2,v 1.11 2002/02/08 01:28:23 ross Exp $
|
||||
.\" $NetBSD: sysarch.2,v 1.12 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991 Regents of the University of California.
|
||||
.\" All rights reserved.
|
||||
@ -54,18 +54,15 @@ with the arguments specified by the
|
||||
.Fa args
|
||||
pointer.
|
||||
.Fa args
|
||||
is a pointer to a structure defining the actual
|
||||
arguments of the function.
|
||||
Symbolic constants and argument structures
|
||||
for the architecture-dependent
|
||||
is a pointer to a structure defining the actual arguments of the function.
|
||||
Symbolic constants and argument structures for the architecture-dependent
|
||||
functions can be found in the header file
|
||||
.Ao Pa machine/sysarch.h Ac .
|
||||
.Pp
|
||||
The
|
||||
.Fn sysarch
|
||||
system call should never be called directly by
|
||||
user programs. Instead, they should access
|
||||
its functions using the architecture-dependent
|
||||
system call should never be called directly by user programs.
|
||||
Instead, they should access its functions using the architecture-dependent
|
||||
library.
|
||||
.Sh RETURN VALUES
|
||||
See the manual pages for specific architecture-dependent function calls
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: syscall.2,v 1.11 2002/02/08 01:28:23 ross Exp $
|
||||
.\" $NetBSD: syscall.2,v 1.12 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -82,8 +82,9 @@ such as
|
||||
Due to ABI implementation differences in passing struct or union
|
||||
type arguments to system calls between different processors, all
|
||||
system calls pass instead pointers to such structs or unions, even
|
||||
when the documentation of the system call mentions otherwise. The
|
||||
conversion between passing structs and unions is handled normally
|
||||
via userland stubs. The correct arguments for the kernel entry
|
||||
when the documentation of the system call mentions otherwise.
|
||||
The conversion between passing structs and unions is handled normally
|
||||
via userland stubs.
|
||||
The correct arguments for the kernel entry
|
||||
points for each system call can be found in the header file
|
||||
.Ao Pa sys/syscallargs.h Ac
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: truncate.2,v 1.16 2002/08/18 05:34:34 yamt Exp $
|
||||
.\" $NetBSD: truncate.2,v 1.17 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -56,9 +56,9 @@ or referenced by
|
||||
.Fa fd
|
||||
to have a size of
|
||||
.Fa length
|
||||
bytes. If the file previously
|
||||
was larger than this size, the extra data
|
||||
is discarded. If it was previously shorter than
|
||||
bytes.
|
||||
If the file previously was larger than this size, the extra data is discarded.
|
||||
If it was previously shorter than
|
||||
.Fa length ,
|
||||
its size is increased to the specified value and
|
||||
the extended area appears as if it were zero-filled.
|
||||
@ -69,8 +69,8 @@ the file must be open for writing; for
|
||||
.Fn truncate ,
|
||||
the process must have write permissions for the file.
|
||||
.Sh RETURN VALUES
|
||||
A value of 0 is returned if the call succeeds. If the call
|
||||
fails a -1 is returned, and the global variable
|
||||
A value of 0 is returned if the call succeeds.
|
||||
If the call fails a -1 is returned, and the global variable
|
||||
.Va errno
|
||||
specifies the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: umask.2,v 1.12 2002/04/29 01:41:46 simonb Exp $
|
||||
.\" $NetBSD: umask.2,v 1.13 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -50,9 +50,8 @@ The
|
||||
.Fn umask
|
||||
routine sets the process's file mode creation mask to
|
||||
.Fa numask
|
||||
and returns the previous value of the mask. The 9 low-order
|
||||
access permission
|
||||
bits of
|
||||
and returns the previous value of the mask.
|
||||
The 9 low-order access permission bits of
|
||||
.Fa numask
|
||||
are used by system calls, including
|
||||
.Xr open 2 ,
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: vfork.2,v 1.20 2002/07/10 23:37:19 wiz Exp $
|
||||
.\" $NetBSD: vfork.2,v 1.21 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -93,7 +93,8 @@ since
|
||||
.Xr exit 3
|
||||
will flush and close standard I/O channels, and thereby mess up the
|
||||
standard I/O data structures
|
||||
in the parent process. (Even with
|
||||
in the parent process.
|
||||
(Even with
|
||||
.Xr fork 2
|
||||
it is wrong to call
|
||||
.Xr exit 3
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: wait.2,v 1.18 2002/04/29 01:41:46 simonb Exp $
|
||||
.\" $NetBSD: wait.2,v 1.19 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -101,7 +101,8 @@ equals the absolute value of
|
||||
.Pp
|
||||
The
|
||||
.Fa status
|
||||
parameter is defined below. The
|
||||
parameter is defined below.
|
||||
The
|
||||
.Fa options
|
||||
parameter contains the bitwise OR of any of the following options:
|
||||
.Bl -tag -width WUNTRACED
|
||||
@ -119,7 +120,8 @@ signal also have their status reported.
|
||||
If this option is specified, the call will wait only for processes that
|
||||
are configured to post a signal other than
|
||||
.Dv SIGCHLD
|
||||
when they exit. If
|
||||
when they exit.
|
||||
If
|
||||
.Dv WALTSIG
|
||||
is not specified, the call will wait only for processes that
|
||||
are configured to post
|
||||
@ -245,8 +247,8 @@ If
|
||||
.Fn wait
|
||||
returns due to a stopped
|
||||
or terminated child process, the process ID of the child
|
||||
is returned to the calling process. Otherwise, a value of -1
|
||||
is returned and
|
||||
is returned to the calling process.
|
||||
Otherwise, a value of -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Pp
|
||||
@ -266,11 +268,9 @@ set to
|
||||
Otherwise, if
|
||||
.Dv WNOHANG
|
||||
is specified and there are
|
||||
no stopped or exited children,
|
||||
0 is returned.
|
||||
no stopped or exited children, 0 is returned.
|
||||
If an error is detected or a caught signal aborts the call,
|
||||
a value of -1
|
||||
is returned and
|
||||
a value of -1 is returned and
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
@ -278,8 +278,7 @@ is set to indicate the error.
|
||||
will fail and return immediately if:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er ECHILD
|
||||
The calling process has no existing unwaited-for
|
||||
child processes.
|
||||
The calling process has no existing unwaited-for child processes.
|
||||
.It Bq Er EFAULT
|
||||
The
|
||||
.Fa status
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: write.2,v 1.20 2002/08/18 05:55:24 yamt Exp $
|
||||
.\" $NetBSD: write.2,v 1.21 2002/10/01 18:10:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -113,7 +113,8 @@ Upon return from
|
||||
the pointer is incremented by the number of bytes which were written.
|
||||
.Pp
|
||||
Objects that are not capable of seeking always write from the current
|
||||
position. The value of the pointer associated with such an object
|
||||
position.
|
||||
The value of the pointer associated with such an object
|
||||
is undefined.
|
||||
.Pp
|
||||
If the real user is not the super-user, then
|
||||
@ -141,7 +142,8 @@ the return value must be noted,
|
||||
and the remainder of the operation should be retried when possible.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion the number of bytes which were written
|
||||
is returned. Otherwise a -1 is returned and the global variable
|
||||
is returned.
|
||||
Otherwise a -1 is returned and the global variable
|
||||
.Va errno
|
||||
is set to indicate the error.
|
||||
.Sh ERRORS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: tcgetsid.3,v 1.2 2002/02/07 07:00:34 ross Exp $
|
||||
.\" $NetBSD: tcgetsid.3,v 1.3 2002/10/01 18:11:45 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -50,8 +50,8 @@
|
||||
The
|
||||
.Nm tcgetsid
|
||||
function returns the value of the session ID associated with the specified
|
||||
controlling terminal device. The session ID is defined as the process group
|
||||
ID of the session leader.
|
||||
controlling terminal device.
|
||||
The session ID is defined as the process group ID of the session leader.
|
||||
.Sh ERRORS
|
||||
If an error occurs,
|
||||
.Nm tcgetsid
|
||||
|
Loading…
Reference in New Issue
Block a user