Home | History | Annotate | only in /src/lib/libc/sys
History log of /src/lib/libc/sys
RevisionDateAuthorComments
 1.4 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.3 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.2 04-May-1999  christos branches: 1.2.6;
use a local vfork declaration to avoid symbol renaming.
 1.1 06-Nov-1997  cgd branches: 1.1.2;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_Ovfork.c was added on branch netbsd-1-3 on 1997-11-08 22:02:48 +0000
 1.2.6.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.2 18-Jan-2003  thorpej branches: 1.2.110;
Merge the nathanw_sa branch.
 1.1 17-Jul-2001  thorpej branches: 1.1.2;
Lint stubs for clone(2).
 1.1.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.1.2.1 17-Jul-2001  nathanw file Lint___clone.c was added on branch nathanw_sa on 2001-10-08 20:21:30 +0000
 1.2.110.1 02-Aug-2025  perseant Sync with HEAD
 1.2 01-Nov-2021  thorpej Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
 1.1 10-Apr-2009  christos branches: 1.1.2;
Add a special lint stub for __sigaction14 which broke when we switched
to sigaction_sigtramp.
 1.1.2.2 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.1.2.1 10-Apr-2009  jym file Lint___sigaction14.c was added on branch jym-xensuspend on 2009-05-13 19:18:27 +0000
 1.1 01-Nov-2021  thorpej Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
 1.4 26-Mar-2004  drochner sigreturn14 is just for compatibility, not referenced by any new code
 1.3 11-Sep-2003  christos we only have it if __HAVE_SIGINFO is not defined.
 1.2 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 26-Sep-1998  christos branches: 1.1.8;
Adapt to the new signal changes.
 1.1.8.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.4 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.3 18-Jan-2003  thorpej branches: 1.3.110;
Merge the nathanw_sa branch.
 1.2 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.1 10-Dec-2000  mycroft branches: 1.1.2;
Handle __syscall() in user-level code for i386.
 1.1.2.1 21-Jun-2002  nathanw Catch up to -current.
 1.3.110.1 02-Aug-2025  perseant Sync with HEAD
 1.5 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.4 20-Jan-2024  christos branches: 1.4.2;
Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.3 24-Jun-2012  christos fix old style definitions; XXX: gcc should have picked them up but it did not.
 1.2 14-Jun-2000  cgd branches: 1.2.64;
fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 04-Jan-1998  thorpej branches: 1.1.8;
Add a lint stub for __vfork14.S
 1.1.8.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.2.64.1 30-Oct-2012  yamt sync with head
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.3 14-Jun-2000  cgd branches: 1.3.118;
fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.2 10-Mar-1999  kleink branches: 1.2.8;
Sync with declaration in <unistd.h>.
 1.1 06-Nov-1997  cgd branches: 1.1.2;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_brk.c was added on branch netbsd-1-3 on 1997-11-08 22:02:52 +0000
 1.2.8.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.118.1 02-Aug-2025  perseant Sync with HEAD
 1.4 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.3 20-Jan-2024  christos branches: 1.3.2;
Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 17-Jul-2001  thorpej branches: 1.1.2;
Lint stubs for clone(2).
 1.1.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.1.2.1 17-Jul-2001  nathanw file Lint_clone.c was added on branch nathanw_sa on 2001-10-08 20:21:31 +0000
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 07-Feb-2017  kamil Mark exect(3) obsolete and bind it to plain execve(2) on all platforms

The original exect(2) from BSD4.2 was enabling bit for tracing
(single-step mode) and calling execve(2). The purpose of it was to generate
a signal for a tracer once the application will change its image to a new
program.

This approach no longer works as:
- exect(2) traces (single-steps) libc and it requires hundreds or
thousands steps before entering a new image
- it's vax and x86 specific code
- this functionality has been moved to the kernel - once a process is
traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to
its debugger
- the side effects and unportability make this interface unusable
- there are no known users of this interface
- it apparently never worked better since day0 of NetBSD ("day0 bug")

Users are requested to move to other execve(2) variants. Calling current
execve(2) as it is the most similar behavior to this one from BSD4.2.

Discussed several times on mailing lists and in PR/51700.

Add warning to exect(3) telling about marking this function obsolete.

This function is prepared to be removed in next libc major bump.

Sponsored by <The NetBSD Foundation>
 1.2 14-Jun-2000  cgd branches: 1.2.88; 1.2.92;
fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 06-Nov-1997  cgd branches: 1.1.2; 1.1.10;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.10.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_exect.c was added on branch netbsd-1-3 on 1997-11-08 22:02:55 +0000
 1.2.92.1 21-Apr-2017  bouyer Sync with HEAD
 1.2.88.1 20-Mar-2017  pgoyette Sync with HEAD
 1.3 16-Jul-2005  christos We don't need to define fork anymore (pthread_atfork.c) or setlogin
(setlogin.c). Lint pass 2 works now.
 1.2 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 06-Nov-1997  cgd branches: 1.1.2; 1.1.10;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.10.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_fork.c was added on branch netbsd-1-3 on 1997-11-08 22:02:57 +0000
 1.3 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.2 18-Jan-2003  thorpej branches: 1.2.110;
Merge the nathanw_sa branch.
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file Lint_getcontext.c was initially added on branch nathanw_sa.
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.2.110.1 02-Aug-2025  perseant Sync with HEAD
 1.3 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.2 14-Jun-2000  cgd branches: 1.2.118;
fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 06-Nov-1997  cgd branches: 1.1.2; 1.1.10;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.10.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_pipe.c was added on branch netbsd-1-3 on 1997-11-08 22:02:49 +0000
 1.2.118.1 02-Aug-2025  perseant Sync with HEAD
 1.5 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.4 21-Jan-2024  christos branches: 1.4.2;
fix alpha, grr.
 1.3 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.2 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 06-Nov-1997  cgd branches: 1.1.2; 1.1.10;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.10.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_ptrace.c was added on branch netbsd-1-3 on 1997-11-08 22:02:53 +0000
 1.4.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.3 14-Jun-2000  cgd branches: 1.3.118;
fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.2 12-Jul-1999  kleink branches: 1.2.6;
XSH5: change function signature to `void *sbrk(intptr_t)'.
 1.1 06-Nov-1997  cgd branches: 1.1.2;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_sbrk.c was added on branch netbsd-1-3 on 1997-11-08 22:02:56 +0000
 1.2.6.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.118.1 02-Aug-2025  perseant Sync with HEAD
 1.3 16-Jul-2005  christos We don't need to define fork anymore (pthread_atfork.c) or setlogin
(setlogin.c). Lint pass 2 works now.
 1.2 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 06-Nov-1997  cgd branches: 1.1.2; 1.1.10;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.10.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_setlogin.c was added on branch netbsd-1-3 on 1997-11-08 22:02:58 +0000
 1.2 29-Sep-1998  thorpej These are no longer needed.
 1.1 06-Nov-1997  cgd branches: 1.1.2;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_sigpending.c was added on branch netbsd-1-3 on 1997-11-08 22:02:50 +0000
 1.2 29-Sep-1998  thorpej These are no longer needed.
 1.1 06-Nov-1997  cgd branches: 1.1.2;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_sigprocmask.c was added on branch netbsd-1-3 on 1997-11-08 22:02:54 +0000
 1.2 29-Sep-1998  thorpej These are no longer needed.
 1.1 06-Nov-1997  cgd branches: 1.1.2;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_sigreturn.c was added on branch netbsd-1-3 on 1997-11-08 22:02:57 +0000
 1.2 29-Sep-1998  thorpej These are no longer needed.
 1.1 06-Nov-1997  cgd branches: 1.1.2;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_sigsuspend.c was added on branch netbsd-1-3 on 1997-11-08 22:02:59 +0000
 1.5 01-Dec-2024  rillig libc: modernize lint stubs

Use prototype function definitions instead of identifier lists, as C23
does not support the latter.

Remove redundant /*ARGSUSED*/ comments and parentheses.
 1.4 18-Jan-2003  thorpej branches: 1.4.110;
Merge the nathanw_sa branch.
 1.3 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.2 14-Jun-2000  cgd branches: 1.2.4;
fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 06-Nov-1997  cgd branches: 1.1.2; 1.1.10;
lint stubs for functions which ports use assembly versions. When using
an assembly version of a function, add the right lint stub to the Makefile.inc
which specifies the source to build the function (see the
arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
functions, because some of them don't _have_ normal C versions and if
that were done dependencies would get messed up.
 1.1.10.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.2.2 08-Nov-1997  veego pull up changes from the trunk (approved by perry) from cgd:
>lint stubs for functions which ports use assembly versions. When using
>an assembly version of a function, add the right lint stub to the Makefile.inc
>which specifies the source to build the function (see the
>arch/i386/*/Makefile.inc). Can't just lint the normal C versions of these
>functions, because some of them don't _have_ normal C versions and if
>that were done dependencies would get messed up.
 1.1.2.1 06-Nov-1997  veego file Lint_syscall.c was added on branch netbsd-1-3 on 1997-11-08 22:02:51 +0000
 1.2.4.1 21-Jun-2002  nathanw Catch up to -current.
 1.4.110.1 02-Aug-2025  perseant Sync with HEAD
 1.259 09-Mar-2025  martin fix typo
 1.258 09-Mar-2025  christos PR/59160: Taylor R Campbell: extattrctl(2): missing man page
 1.257 03-Oct-2024  christos typo
 1.256 03-Oct-2024  christos new semtimedop(2) GSoC 2024 (Shivraj Jamgade)
 1.255 20-May-2024  christos branches: 1.255.2;
Rename dup3110 to dup3100 to match historical practice for NetBSD-11,
because we already have kevent100. Fix compat_dup3 to belong in compat_100
not compat_110.
 1.254 19-May-2024  christos version dup3
 1.253 03-Aug-2023  nia Revert addition of epoll to libc until discussion concludes
 1.252 28-Jul-2023  christos Add epoll(2) from Theodore Preduta as part of GSoC 2023
 1.251 10-Jul-2023  christos Add memfd_create(2) from GSoC 2023 by Theodore Preduta
 1.250 01-Nov-2021  thorpej Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
 1.249 31-Oct-2021  thorpej Tidy up how __sigaction14_sigtramp.c is added to SRCS.
 1.248 26-Oct-2021  christos Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
sigcontext before. all the other ports that supported sigcontext had
the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
 1.247 01-Oct-2021  christos PR/56424: Clay Mayers: recvfrom() is not a cancelation point as documented
in pthread_setcanceltype.3
 1.246 19-Sep-2021  thorpej Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.
 1.245 14-Aug-2020  riastradh New system call getrandom() compatible with Linux and others.

Three ways to call:

getrandom(p, n, 0) Blocks at boot until full entropy.
Returns up to n bytes at p; guarantees
up to 256 bytes even if interrupted
after blocking. getrandom(0,0,0)
serves as an entropy barrier: return
only after system has full entropy.

getrandom(p, n, GRND_INSECURE) Never blocks. Guarantees up to 256
bytes even if interrupted. Equivalent
to /dev/urandom. Safe only after
successful getrandom(...,0),
getrandom(...,GRND_RANDOM), or read
from /dev/random.

getrandom(p, n, GRND_RANDOM) May block at any time. Returns up to n
bytes at p, but no guarantees about how
many -- may return as short as 1 byte.
Equivalent to /dev/random. Legacy.
Provided only for source compatibility
with Linux.

Can also use flags|GRND_NONBLOCK to fail with EWOULDBLOCK/EAGAIN
without producing any output instead of blocking.

- The combination GRND_INSECURE|GRND_NONBLOCK is the same as
GRND_INSECURE, since GRND_INSECURE never blocks anyway.

- The combinations GRND_INSECURE|GRND_RANDOM and
GRND_INSECURE|GRND_RANDOM|GRND_NONBLOCK are nonsensical and fail
with EINVAL.

As proposed on tech-userlevel, tech-crypto, tech-security, and
tech-kern, and subsequently adopted by core (minus the getentropy part
of the proposal, because other operating systems and participants in
the discussion couldn't come to an agreement about getentropy and
blocking semantics):

https://mail-index.netbsd.org/tech-userlevel/2020/05/02/msg012333.html
 1.244 17-Jul-2020  kamil Add ppoll() a compatibility wrapper around pollts(2)

Submitted by Apurva Nandan.
 1.243 16-May-2020  christos Add ACL support for FFS. From FreeBSD.
 1.242 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.241 15-Sep-2019  christos documentation for fexecve(2)
 1.240 31-Jul-2018  rjs branches: 1.240.2;
Userland changes for getsockopt2().
 1.239 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.238 25-Dec-2017  kamil branches: 1.238.2; 1.238.4;
libc: Add a dummy implementation of vadvise()

This readds a symbol that has been removed accidentally without major bump.

The implementation is dummy (similar to the old one), without API in public
headers.

Pointed out by <maya>

Sponsored by <The NetBSD Foundation>
 1.237 19-Dec-2017  kamil Deregister vadvise.S from lib/libc/sys/Makefile.inc

Such file was never registered since the inception of NetBSD.
The (o)vadvise is dummy since the beginning of NetBSD.

Sponsored by <The NetBSD Foundation>
 1.236 01-Apr-2017  abhinav Add man page links for:
EV_SET to kqueue(2)
getmntoptstr, getmntoptnum, freemntopts to getmntopts(3)

Reviewed by wiz@
 1.235 23-Feb-2017  christos add link for accept4.
 1.234 08-Feb-2017  maya Add accept4, a tiny wrapper around paccept.

accept4 is a syscall in Linux, FreeBSD and OpenBSD. It is used in
LLVM, zeromq, and probably others. paccept is a superset of it.

adding it to libc ensures it is used by programs and prevents the
need to define the same wrapper in every program.
 1.233 08-Feb-2017  maya Make paccept a weak symbol in preparation for using it in another function
 1.232 07-Feb-2017  kamil Mark exect(3) obsolete and bind it to plain execve(2) on all platforms

The original exect(2) from BSD4.2 was enabling bit for tracing
(single-step mode) and calling execve(2). The purpose of it was to generate
a signal for a tracer once the application will change its image to a new
program.

This approach no longer works as:
- exect(2) traces (single-steps) libc and it requires hundreds or
thousands steps before entering a new image
- it's vax and x86 specific code
- this functionality has been moved to the kernel - once a process is
traced it will generate SIGTRAP with si_code TRAP_EXEC and route it to
its debugger
- the side effects and unportability make this interface unusable
- there are no known users of this interface
- it apparently never worked better since day0 of NetBSD ("day0 bug")

Users are requested to move to other execve(2) variants. Calling current
execve(2) as it is the most similar behavior to this one from BSD4.2.

Discussed several times on mailing lists and in PR/51700.

Add warning to exect(3) telling about marking this function obsolete.

This function is prepared to be removed in next libc major bump.

Sponsored by <The NetBSD Foundation>
 1.231 03-Jul-2016  christos branches: 1.231.2; 1.231.4;
GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).
 1.230 23-Apr-2016  christos add clock_getcpuclockid{2,}
 1.229 03-Apr-2016  christos userland bits for wait6/waitid.
 1.228 29-Nov-2015  pgoyette Initial documentation of the internal syscalls that implement the librt
posix semaphores. As requested in PR kern/37427

XXX Feel free to expand this page!
 1.227 31-Jan-2015  christos PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno, so make it PSEUDO_NOERROR, by adding a new
category GLUENOERR.
 1.226 10-Dec-2014  pooka Add hooks for RUMPRUN build of libc

If "yes", does the following (default "no"):
* prevents ASM syscalls from being built (librump provides syscalls)
* does not include compat (useless when application is linked with libc)
* does not build tags (no /var/db to install them to)
* does not include tls

==> libc for rumprun can now be built against unmodified NetBSD sources
 1.225 25-Sep-2014  manu Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
 1.224 25-Jul-2014  dholland branches: 1.224.2;
Add userlevel manifestations of posix_fallocate and fdiscard, in
unistd.h and libc, and add a man page.

Allow wiggle room in the man page for implementations of fallocate
that either (a) don't fully unwind on failure, leaving new blocks
allocated without changing the file size, or (b) create only in-memory
transient reservations that disappear when crashing or rebooting.

Also, add crossreference to fdiscard from ftruncate(2), and remove the
old BUGS entry from there that called for a generalized version that
allows discarding ranges of a file: that's what fdiscard is.
 1.223 31-Jan-2014  christos branches: 1.223.2;
expose __lwp_park60
 1.222 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.221 09-Nov-2013  njoly Add utimens/lutimens man pages links.
 1.220 17-Oct-2013  njoly Change mknodat(2) device argument type from uint32_t to dev_t.
Adds needed extra PAD argument for 64bit alignment, and libc wrapper.
 1.219 29-Mar-2013  christos no need for __lwp_park50.S here and we don't provide __lwp_park60.S so that
it does not get accidentally used.
 1.218 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.217 02-Oct-2012  christos add clock_nanosleep(2)
 1.216 12-Sep-2012  manu branches: 1.216.2;
setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64

Approved by core@
 1.215 22-Jun-2012  christos {send,recv}mmsg glue
 1.214 08-Mar-2012  joerg Implement sem_timedwait.
 1.213 19-Feb-2012  matt Emit SA syscalls using SYS_compat_60_*
 1.212 13-Feb-2012  dholland Quota-related docs fixes:

- Remove old quotactl(2); replace with new __quotactl(2).
- Document quota_getrestrictions(3), the semantic restriction codes,
and quota_quotaon/off(3).
- Update VFS_QUOTACTL(9), which was still describing the pre-proplib API.

Approved by releng for the freeze.
 1.211 11-Feb-2012  martin Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.
 1.210 01-Feb-2012  dholland Change the syscall API for quotas over to the new non-proplib one.

- struct vfs_quotactl_args -> struct quotactl_args
- add sys/stdint.h to sys/quotactl.h for clean userland build
- install sys/quotactl.h in /usr/include
- update set lists for same
- add new marshalling code in libquota
- add new unmarshalling code in vfs_syscalls.c
- discard proplib interpreter code in vfs_quotactl.c
- add dispatching code for the 14 quotactl ops in vfs_quotactl.c
- mark the proplib quotactl syscall obsolete
- add a new syscall number for the new quotactl syscall
- change the name of the syscall to __quotactl()
- remove the decl of the old quotactl from quota/quotaprop.h
- add a decl of the new quotactl to sys/quotactl.h
- update the libc build
- update ktruss
- remove proplib marshalling code from libquota
- update copy of syscall table in gdb ppc sources
- hack rumphijack to accomodate new quotactl name (as I recall,
pooka wanted such a name change to simplify something, but I
don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.
 1.209 17-Aug-2011  manu branches: 1.209.2;
Add futimens(2) and part of utimnsat(2)
 1.208 08-Aug-2011  manu First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
 1.207 27-Jun-2011  manu Fix multiple non compliances in our Linux-like extattr API, and make it
public so that it can be used.
 1.206 26-Jun-2011  christos * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.205 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.204 10-Jan-2011  christos branches: 1.204.2;
add sigqueue
 1.203 06-Aug-2010  christos weakasm for kevent so it can be a cancelation point.
 1.202 20-Oct-2009  jnemeth First pass at a manpage for modctl(2) (hi ad!).
 1.201 10-Apr-2009  christos Add a special lint stub for __sigaction14 which broke when we switched
to sigaction_sigtramp.
 1.200 29-Jan-2009  martin branches: 1.200.2;
__posix_fadvise50() does not use the standard errno behaviour, but returns
the error value itself - so move it from ASM to NOERR. Pointed out by
Nick. I have no idea how/if this ever could have worked, but I would swear
I realy tested it when I last touched it! Fixes the sys/fs/posix_fadvise
regression test.
 1.199 16-Jan-2009  christos don't use glue for semctl, the number of underscores makes this an intractable
problem :-) Use regular wrappers like we do with sigtimedwait.
 1.198 15-Jan-2009  christos fix the semctl glue build that worked before by chance by side effects of
building the the assembly stub as a normal stub. Just build it as a glue
stub.
 1.197 11-Jan-2009  christos merge christos-time_t
 1.196 26-Oct-2008  mrg branches: 1.196.2; 1.196.4;
define and use LIBCDIR in terms of .CURDIR. fixes compat/lib/libc build.
 1.195 06-Aug-2008  matt Add a missing dependency
 1.194 05-Aug-2008  lukem Redo previous in a much simpler way.
Inspired by and fixes PR 39285.
 1.193 05-Aug-2008  lukem Add '-e sedcmd' to makelintstub, to translate filename to syscall name.
Improve usage, etc.

Invoke makelintstub with -e 's/^tmp_//' when building LintSysNormal.c

Fixes build problem that matt@ highlighted to me.
 1.192 04-Aug-2008  lukem Prefix filenames of tomporarily generated .S files with "tmp_", so that the
".if exists(foo.S)" check doesn't get confused by ${.OBJDIR}/foo.S.
Fixes PR/39217
 1.191 02-Jul-2008  rmind Move scheduling functions from librt to libc.
Fixes PR/38657.
 1.190 25-Jun-2008  ad Fix MLINKS line
 1.189 25-Jun-2008  ad Add getlogin_r. Manual page changes mostly lifted from FreeBSD.
 1.188 15-Jun-2008  christos Glue in cpuset.c
 1.187 22-Apr-2008  rmind branches: 1.187.2;
Add posix_madvise(2) and appropriate definitions in sys/mman.h header.
This interface is identical to madvise(2), however, is defined by POSIX.
Partially sync madvise(2) man page with FreeBSD.

Reviewed by <mrg>.
 1.186 09-Feb-2008  mrg branches: 1.186.4;
m68k/Makefile.inc:
- add __mmap.S to SRCS.
- add _lwp_getprivate.S mremap.S to ASM.
sys/Makefile.inc:
- look for __glue.S as well as glue.S.
- introduce a new ASM_MD and set it to "_lwp_getprivate.S mremap.S".
this is used for assembler files that may have non-default
implementations.

now m68k and m68000 mostly build again.
 1.185 27-Jan-2008  martin libc part of posix_fadvise changes.
The new compatibility stub is ABI compatible to the old syscall, so no
need to bump libc minor.
 1.184 16-Jan-2008  ad Pull in my modules code for review/test/hacking.
 1.183 15-Jan-2008  rmind Implementation of processor-sets, affinity and POSIX real-time extensions.
Add schedctl(8) - a program to control scheduling of processes and threads.

Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;

Proposed on: <tech-kern>. Reviewed by: <ad>.
 1.182 14-Dec-2007  yamt document following system calls.
_lwp_ctl
_lwp_getname
_lwp_setname
 1.181 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.180 13-Nov-2007  ad - stack_protector.c doesn't really belong under sys/. Add a new directory
for misc support routines and put it there.
- Add a libc constructor. Use this to initialize threading and the
stack protector stuff. libpthread cannot be initialized safely using
its own constructor because libc and libpthread are deeply intertwined.
PR bin/37347
 1.179 12-Nov-2007  ad Add _lwp_ctl() system call: provides a bidirectional, per-LWP communication
area between processes and the kernel.
 1.178 07-Nov-2007  ad Add _lwp_setname/_lwp_getname to libc.
 1.177 09-Oct-2007  rmind Add cancellation stubs in libpthread for POSIX messages queues and
asynchronous I/O.

OK by <ad>.
 1.176 17-Jul-2007  joerg branches: 1.176.4;
Add native mremap system call based on the UVM implementation for
Linux compat. Add code to enforce alignment of the new location.
Special thanks to wizd for helping with the man page.
 1.175 14-Jul-2007  dsl Change libc system callstub from 'mount' to '__mount50', add compat call.
 1.174 03-Jun-2007  christos provide a weak symbol for readlink since it is used internally.
 1.173 10-Feb-2007  ad Add manual pages for new LWP syscalls.
 1.172 09-Feb-2007  ad - Exclude SA syscalls from LintSysNormal.c.
- Obsolete SA manual pages.
 1.171 16-Jan-2007  ad Add: _lwp_kill, _lwp_detach, _lwp_park, _lwp_unpark, _lwp_unpark_all,
sched_yield.
 1.170 08-Nov-2006  christos add ssp code and bump.
 1.169 31-Jul-2006  martin Make filehandles opaque to userland
 1.168 13-Jul-2006  martin Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
 1.167 26-Jun-2006  mrg version the socket(2) syscall. for compat30 socket, we use
EPROTONOSUPPORT instead of EAFNOSUPPORT.

from pavel@ with a little bit of clean up from myself.

XXX: netbsd32 (and perhaps other emulations) should be able
XXX: to call the standard socket calls for this i think, but
XXX: revisit this at another time.
 1.166 29-May-2006  drochner support the new ntp_gettime() syscall and add compatibility for the old one
 1.165 04-May-2006  christos Adjust for the fhstat() compat kernel change.
 1.164 11-Mar-2006  christos Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
 1.163 19-Feb-2006  yamt document posix_fadvise.
 1.162 20-Jan-2006  christos Make _Exit an alias to _exit.
 1.161 29-Nov-2005  yamt add posix_fadvise.
 1.160 13-Sep-2005  christos compat core reorg.
 1.159 19-Aug-2005  christos 64 bit inode changes
 1.158 16-Jul-2005  christos We don't need to define fork anymore (pthread_atfork.c) or setlogin
(setlogin.c). Lint pass 2 works now.
 1.157 18-Mar-2005  kleink Interpose cancellation points in pollts() and pselect(), bringing us
to libc.so.12.127 and libpthread.so.0.6.
 1.156 26-Feb-2005  matt branches: 1.156.2;
Build syscalls stubs for pselect and pollts. Update man pages.
 1.155 25-Feb-2005  matt Alphabetize main list of sources.
 1.154 02-Jan-2005  thorpej System calls and support routines for file system extended attributes. Libc
version is bumped to 12.125.

From FreeBSD.
 1.153 21-May-2004  kleink IEEE Std 1003.1-2001/Cor 2-2004, item XSH/TC2/D6/5: fdatasync() shall
have cancellation points.

Note: we ride today's resolver-related version bumps.
 1.152 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.151 26-Mar-2004  drochner sigreturn() isn't officially supported anymore; remove its manpage
(which was outdated anyway)
 1.150 26-Mar-2004  drochner sigreturn14 is just for compatibility, not referenced by any new code
 1.149 14-Mar-2004  yamt some manpages of scheduler activation syscalls.
 1.148 08-Feb-2004  lukem MAKEVERBOSE messages
 1.147 29-Jan-2004  tsarna uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in
PR#23470, with minor updates by me. This is only the syscall support
from that PR, for now.

Changes: port over fix from FreeBSD for multicast address generation.
Changed bcopy to memcpy. For now, #ifdef notyet the portions of
kern_uuid.c that are meant to be used by (currently nonexistent) other
things in the kernel. Added syscall to COMPAT_FREEBSD as well, though
that's currently not useful, as any program new enough to use this call
also uses other syscalls we don't (yet) emulate.
 1.146 02-Jan-2004  cl - libc.so.12.109 and libpthread.so.0.4
- add ssize_t stackinfo_offset argument to sa_register syscall
- remove sa_unblockyield syscall
- make __sigprocmask14 syscall weak
- in pthread__sa_start: catch up with 4-argument sa_register syscall
 1.145 18-Nov-2003  thorpej Userland portion of fsync_range(2), written by Bill Studenmund, and
contributed by Wasabi Systems, Inc.
 1.144 16-Sep-2003  cl fix SA/pthread pagefault failure:
- prevent BLOCKED upcalls on double page faults and during upcalls
- make libpthread handle blocked threads which hold locks
- prevent UNBLOCKED upcalls from overtaking their BLOCKED upcall
this adds a new syscall sa_unblockyield
see also http://mail-index.netbsd.org/tech-kern/2003/09/15/0020.html
 1.143 13-Sep-2003  christos forgot to install timer_settime.
 1.142 13-Sep-2003  christos Add timer man pages. Hi Nathan!
 1.141 01-Aug-2003  lukem Rework how dependency generation is performed:

* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
This is a change of behaviour. If a Makefile wants the clean semantics
it must specifically append to CLEANFILES.
Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
 1.140 08-May-2003  christos USE ${HOST_SH}
 1.139 14-Mar-2003  nathanw Make execve a weak syscall.
 1.138 01-Mar-2003  bjh21 Add _Exit(), for C99 and POSIX-2001.
Proposed on tech-userlevel to a resounding silence in April last year.
 1.137 15-Feb-2003  jdolecek add POSIX sigtimedwait(), sigwaitinfo(), sigwait() - wait for queued signals

note these are for non-threaded programs only - libpthread will provide
it's own thread-aware wrapper
 1.136 13-Feb-2003  jdolecek for WEAKSM list, use leading tab, rather than spaces on the continuation lines
 1.135 28-Jan-2003  thorpej Make the generated .S files depend on ${.CURDIR}/sys/Makefile.inc.
 1.134 27-Jan-2003  nathanw Move accept and connect stubs to WEAKASM so that they can be overridden.
 1.133 20-Jan-2003  christos Add _ksem stubs.
 1.132 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.131 23-Oct-2002  jdolecek make support for kqueue(2) and kevent(2) unconditional, the kqueue branch
was merged
 1.130 12-Oct-2002  jdolecek if WITH_KQUEUE is defined and <sys/event.h> exists in DESTDIR, compile
support for kqueue(2) and kevent(2) in

this is temporary measure to ease testing of kqueue branch; the support
will be made unconditional once kqueue branch would be merged
 1.129 22-Sep-2002  jdolecek add kqueue(2)/kevent(2) manpage to mainline, to reduce difference between
the kqueue branch and -current and thus make testing easier

change HISTORY to clearly state this interface is only available with
experimental kernel branch
add Jason Thorpe and me to AUTHORS
update .Dd
 1.128 14-Sep-2002  thorpej Fix some problems using makelintstub as a cross-tool:
* Require that the path to the C preprocessor be passed in the CPP
environemnt variable, and use it rather than hard-coding "cpp".
Provide the target's preprocessor when invoking makelintstub.
* Fix some quoting issues that turned up with Solaris 8's XPG4 sh and sed.
* Don't use echo -n. Instead, don't bother making the output pretty; the
whitespace isn't supposed to be syntactically significant anyhow.
 1.127 28-Aug-2002  gmcgarry rasctl(2)
 1.126 07-Aug-2002  briggs Add stubs to new system calls for performance monitoring interface.
 1.125 10-Jul-2002  thorpej Enable the libc-provided signal trampoline. The old __sigaction14
entry point has been replaced by the new __sigaction14() which is a
wrapper around the __sigaction_sigtramp system call (which is itself
not directly exposed outside of libc).

No shared library version change is necessary; no new symbols
are exposed outside of libc.
 1.124 29-Jan-2002  tv branches: 1.124.2;
Don't even put Lint*.c in DPSRCS if MKLINT=no.
 1.123 14-Jan-2002  thorpej * Add WSYSCALL() to SYS.h, which creates a system call with an
internal name and a weak alias for the name.
* Add a WEAKASM syscall list, and process it.
* Make sysarch() have an internal name (_sysarch()).
 1.122 13-Nov-2001  tv Only put LintSys*.c in DPSRCS; the others are static files.
 1.121 13-Nov-2001  tv Clean up a little more (DPSRCS already goes in CLEANFILES; reduce
redundancy of DPSRCS).
 1.120 13-Nov-2001  tv No need for the .for in this case (holdover from earlier noncommitted
version of the simplification).
 1.119 13-Nov-2001  tv Make previous a bit cleaner, too: just refer to all these files by the
.S extension; no need to do all the :.o=.S transforms.
 1.118 13-Nov-2001  tv Fix backslash typo in previous.
 1.117 13-Nov-2001  tv Make the generation of syscall stubs a lot more reliable by generating real
`.S' files and letting <bsd.sys.mk> and <bsd.lib.mk> compile them like every
other .S file. The compilation options passed to ${CC} are still correct.

Also make sure LintSysPseudoNoerr.c gets removed on "make clean".
 1.116 16-Sep-2001  manu Added support to use the clockctl driver if present for adjtime(),
clock_settime(), ntp_adjtime() and settimeofday(). The super-user still
always use the plain system call.
Approved by Christos
 1.115 08-Sep-2001  christos Add __clone.S
XXX: This breaks the x86_64 port. Frank are you there?
 1.114 06-Sep-2001  wiz Add ntp_adjtime(2) and ntp_gettime(2) man page.
 1.113 18-Jul-2001  thorpej Build __clone.S, the Lint stubs, and the manual pages.

Yes, I know now all ports have a __clone() stub yet, but this
will force the issue -- they don't get to build their libc until
they implement it.

Implementers are encouraged to use the regression test for it
in src/regress/lib/libc/clone.
 1.112 18-Apr-2001  kleink branches: 1.112.2;
Document fchroot(2).
 1.111 05-Jan-2001  jdolecek branches: 1.111.2;
add utrace(2)
 1.110 13-Dec-2000  matt Add __syscall.S back to sys/Makefile.inc. Remove from arch/i386/gen/
Makefile.inc. If your architecture doesn't have __syscall.S, *add it*.
 1.109 12-Dec-2000  simonb Move __syscall.S to the arch specific Makefile.inc's where it is
implemented.
 1.108 10-Dec-2000  mycroft Handle __syscall() in user-level code for i386.
 1.107 28-Sep-2000  kleink Need an internal name for pipe(2).
 1.106 08-Jul-2000  enami Create link to lchflags.[02].
 1.105 07-Jul-2000  itohy Add special treatment of shmat(2).
On m68k ELF calling standard (__SVR4_ABI__), if a function
returns a pointer, the return value should go to a0 as well as d0.
 1.104 26-Jun-2000  kleink Need an internal name for fork().
 1.103 23-Jun-2000  kleink Add internal names for brk() and sbrk().
 1.102 24-May-2000  perseant branches: 1.102.4;
Add man pages for LFS syscalls
 1.101 21-Apr-2000  minoura issetugid(2) manpage.
 1.100 21-Apr-2000  minoura New syscall issetugid.
 1.99 17-Apr-2000  mrg implement lchflags(2), which does the chflags(2) dance without following
symlinks, and thus can operate on symlinks. remove a bogus comment in
chflags(1) that claims symlinks do not have file flags.

XXX: todo -- make chflags(1) use lchflags(2) when given the right options.
 1.98 31-Jan-2000  christos Add a userland stub to do the union semun -> union semun * redirection.
 1.97 27-Oct-1999  is Actually profile system calls.
Problem and most of the fix reported by Anders Hjalmarsson in PR 4976; libposix
mentioned by Chris G. Demetriou.
 1.96 25-Aug-1999  thorpej branches: 1.96.2;
Add __msgctl13(), __semctl13(), and __shmctl13() (symbols are __RENAME()'d
in their respective header files). Add PSEUDO stubs for the old versions
of these system calls.

Note that __semctl13() doesn't require the extra stub that the old
semctl()/__semctl() did, as the SUSv2 version takes variable arguments,
and thus does not require the extra indirection.
 1.95 04-Jul-1999  sommerfeld Build system call stubs using system includes from ${DESTDIR}/usr/include
if DESTDIR is set.
This allows you to build a working libc which include syscall stubs
for new syscalls not defined in /usr/include/sys/syscall.h
 1.94 30-Jun-1999  wrstuden Give fhopen, fhstat, and fhstatfs a man page.
 1.93 29-Jun-1999  wrstuden Add fhopen, fhstat, and fhstatfs syscall stubs.
 1.92 15-Jun-1999  thorpej Add mlockall(2)/munlockall(2).
 1.91 22-Mar-1999  sommerfe branches: 1.91.2;
Build fchroot and __getcwd syscall stubs
 1.90 24-Feb-1999  drochner use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again
 1.89 11-Feb-1999  carrel use clock_settime.2 not clock_settime.c in MAN
 1.88 11-Feb-1999  kleink Document clock_settime(2) and friends.
 1.87 26-Sep-1998  christos Adapt to the new signal changes.
 1.86 02-Jul-1998  thorpej Wrappers around the indirected positional i/o system calls; the off_t
arguments must be padded.
 1.85 30-Jun-1998  thorpej Add pread(2), pwrite(2), preadv(2), pwritev(2) system calls.
 1.84 27-Jun-1998  christos Add stub for fktrace(2)
 1.83 08-Jun-1998  kleink Build fdatasync(2) stubs and manpage.
 1.82 14-Feb-1998  kleink Oops, silly typo in last commit. Sigh.
 1.81 14-Feb-1998  kleink Generate syscall stubs for getsid() (from thorpej), __posix_chown(),
__posix_fchown() and __posix_lchown().
 1.80 14-Feb-1998  thorpej Add getsid.2
 1.79 02-Feb-1998  perry merge lite-2
 1.78 05-Jan-1998  thorpej Add __vfork14.S and Lint___vfork14.c
 1.77 29-Nov-1997  kleink Modify the recent sigaltstack() interface change to use the __RENAME() scheme;
add __sigaltstack14().
 1.76 06-Nov-1997  cgd sh makelintstub, rather than trying to execute it directly
 1.75 05-Nov-1997  cgd lint stubs for assembly routines.
 1.74 05-Nov-1997  thorpej Instead of creating a .ln for each syscall stub, create one (big) .ln
per class of syscall stubs. This is much more efficient (though it's still
pretty inefficient).

This also fixes a problem with syscall.h and DESTDIR which was pretty
well buried in the old implementation.

From Chris Demetriou <cgd@pa.dec.com>.
 1.73 22-Oct-1997  lukem - use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...
 1.72 21-Oct-1997  thorpej Fix an oversight in the previous.
 1.71 20-Oct-1997  thorpej branches: 1.71.2;
Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2). This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.
 1.70 20-Oct-1997  christos Bring back swapon and getdirentries from libcompat.
 1.69 18-Oct-1997  enami Fix typo; MLINKS are always constructed from pair of link src and dst.

- delete the line `MLINKS += swapctl.2'.
 1.68 16-Oct-1997  christos swapon migrated to libcompat
 1.67 12-Oct-1997  fvdl Create getdirentries man page seperately now.
 1.66 10-Oct-1997  fvdl Add new getdents() syscall, provide compat code for old getdirentries.
 1.65 06-Oct-1997  enami Add C library interface for new system call lchmod, lchown and lutimes.
 1.64 08-Sep-1997  chuck import minherit from OpenBSD
 1.63 25-Aug-1997  mikel feed makelintstub to sh, don't rely on x-bits
 1.62 20-Aug-1997  mikel add link from swapon(2) to swapctl(2); from
<entropy@tardis.bernstein.com> in PR lib/4015
while I'm here, also move swapon.c to a more appropriate spot
 1.61 12-Jun-1997  mrg move swapon() stub here
 1.60 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.59 31-May-1997  cjs Back out BUILDDIR change.
 1.58 30-May-1997  kleink branches: 1.58.2;
DESTDIR -> BUILDDIR
 1.57 24-May-1997  jonathan Delete hanging .if left by patch.
 1.56 24-May-1997  jonathan More table-driven changes: split CPICFLAGS into separate flags, to
support the two different incompatible rules for build .so files from
.S source on both NetBSD and binutils toolchains:

${CPP} | ${AS} for syscalls
${CC} for non-syscalls
for which the different toolchains's ${AS} requires diffferent flags.
 1.55 14-May-1997  kleink Precede the dependency on /usr/include/sys/syscall.h with ${DESTDIR};
fixes PR/3595 from dave@comp.vuw.ac.nz (Dave Sainty).
 1.54 02-May-1997  kleink Use PSEUDO_NOERROR() for _exit(): it never returns.
 1.53 17-Apr-1997  jtc branches: 1.53.2;
Add stubs which set errno to ENOSYS and return -1 for the POSIX.1b
timer_* API. This was done to avoid bumping the libc minor number
each time a new portion is implemented.

This should be extended to the entire .1b API, although that will
require minor header file modifications to add the required structure
and type definitions.
 1.52 17-Apr-1997  jtc Add nanosleep
 1.51 01-Apr-1997  mikel oops, realphabetize manpages
 1.50 29-Mar-1997  christos PR/3410: NAKAJIMA Yoshihiro: Add futimes.2 link
 1.49 29-Mar-1997  thorpej PowerPC uses new binutils, as well.
 1.48 27-Mar-1997  mikel add ktrace(2), don't segregate SYSV IPC manpages, and add link for shmdt(2)
 1.47 22-Dec-1996  cgd add LASM, LNOERR, and LPSEUDO variables, analogous to e.g. PASM, PNOERR, and
PPSEUDO but for .ln files rather than .po files. Add the new variables
to LOBJS, as well. The rules to build those objects them call a helper
script (sys/makelintstub) and pipe the result to lint. Unfortunately,
dependency handling for these built .ln files is a bit sub-optimal right
now, but that can be fixed later.
 1.46 19-Nov-1996  jtc Add clock_* and ntp_* syscalls
 1.45 11-Nov-1996  mycroft Treat reboot() like a normal system call. From PR 2458.
 1.44 19-Oct-1996  perry Remove spurious clock_* syscalls that got committed last night. They
broke shared libc's very badly. (Okayed by thorpej).
 1.43 19-Oct-1996  jtc Generate syscall functions which can never fail (getgid, getegid, geteuid,
getpid, getppid, ...) with new RSYSCALL_NOERROR macro which has been added
to the SYS.h header of each port.
 1.42 13-Oct-1996  cgd temporary hack until better support for multiple toolchains is in the tree:
build SASM and SPSEUDO on the alpha without the '-k' flag to the assembler,
since -k is a flag specific to NetBSD's hacked assembler.
 1.41 19-Sep-1996  jtc Renamed _getlogin syscall to __getlogin, as _getlogin is the namespace
clean name for getlogin.

Moved _getlogin.o (now __getlogin.o) from PSEUDO to ASM, as this
syscall really does have a return value (although it will "always"
succeed since it should only be called from libc's getlogin())
 1.40 07-Sep-1996  mycroft branches: 1.40.2;
Add a poll(2) man page.
 1.39 07-Sep-1996  mycroft Build a stub for poll(2).
 1.38 09-Aug-1996  mrg reboot(2)/getpgid(2) changes.
 1.37 23-Jun-1996  mycroft Resurrect the setre[ug]id() stubs.
 1.36 23-Apr-1996  mycroft branches: 1.36.4;
Build a stub for futimes().
 1.35 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.34 25-Sep-1995  christos Don't write a.out files; breaks parallel makes.
 1.33 27-Feb-1995  cgd fix typo, and the fact that i was using a large xterm
 1.32 27-Feb-1995  cgd clean up merge, fix Id's
 1.31 28-Dec-1994  mycroft Build undelete(2) stub.
 1.30 22-Dec-1994  cgd specify man pages the new way.
 1.29 14-Nov-1994  deraadt ptrace(2) by der mouse; not checked for accuracy
 1.28 20-Oct-1994  cgd make the sysv functions real syscalls.
 1.27 14-Jun-1994  jtc Convert getdtablesize() from syscall to function
 1.26 13-Jun-1994  cgd oops; forgot man page
 1.25 12-Jun-1994  cgd kill async_daemon; it's dead now
 1.24 08-May-1994  cgd oops, forgot to delete
 1.23 07-May-1994  cgd update for present reality. shlib version number bump (last for a bit)
 1.22 07-May-1994  jtc revoke(2) manpage
 1.21 04-May-1994  cgd rlimit stuff, and more. bump shlib major, for rlimit change, and for
safety (now that hackish off_t stuff gone completely.)
 1.20 15-Apr-1994  jtc First cut at a setsid(2) manual page.
 1.19 09-Apr-1994  cgd fix typo; from Thomas Eberhardt
 1.18 06-Apr-1994  cgd M-x shuffle-functions-and-documentation
basically, move things around so documentation is in the correct place,
and bump appropriate functions into the 'compat' section.
 1.17 02-Apr-1994  cgd stubs, to get the padding right. so nasty it's almost unbelievable.
also, kill "special lseek" bogon.
 1.16 31-Mar-1994  mycroft Add lseek.S to SRCS.
 1.15 04-Dec-1993  cgd update for .S and MACHINE_ARCH
 1.14 21-Nov-1993  mycroft MLINKS+=setpgid.2 setpgrp.2
Noticed by Poul-Henning Kamp <phk@data.fls.dk>.
 1.13 14-Nov-1993  cgd Add the System V message queue and semaphore facilities. Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>
 1.12 12-Oct-1993  cgd adding sysarch() man page
 1.11 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.10 29-Sep-1993  pk Support for making PIC versions of the system call stubs.
 1.9 19-Sep-1993  brezak Add sysarch() syscall.
 1.8 25-Aug-1993  brezak Add syscall stubs for SYSV Shared Memory.
 1.7 16-Aug-1993  mycroft We shouldn't be diddling POBJS and CLEANFILES. bsd.lib.mk already does the
Right Thing.
 1.6 16-Aug-1993  mycroft For some reason, substitution on variables doesn't seem to work in a target
list. I don't think I want to know why.
 1.5 16-Aug-1993  mycroft Separate rules for .o and .po files. The previous method just caused too
many problems.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 06-May-1993  cgd diffs for uname (posix!) system call, provided by John Brezak <brezak@osf.org>
 1.2 02-Apr-1993  deraadt added: the entire domainanme set. domainmame(1), domainname(2), and a spiffy
man page.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.36.4.1 10-Dec-1996  mycroft From trunk:
Implement setre[ug]id() for real.
 1.40.2.1 19-Sep-1996  jtc snapshot namespace cleanup: gen
 1.53.2.1 01-Jun-1997  mrg the new system call is going to be swapctl(2).
 1.58.2.5 19-Oct-1997  cjs Oops, fix that last commit.
 1.58.2.4 19-Oct-1997  cjs Update to 1.69.
 1.58.2.3 13-Oct-1997  cjs Update to 1.67.
 1.58.2.2 16-Jun-1997  cjs $CPP was being called without $CPPFLAGS, and thus using the wrong include
files when BUILDDIR was set.
 1.58.2.1 15-Jun-1997  cjs Sync with main branch (for swapctl).
 1.71.2.4 09-Nov-1997  lukem sync with trunk (approved by thorpej)
 1.71.2.3 07-Nov-1997  mellon Pull rev 1.75 and 1.76 up from trunk (cgd)
 1.71.2.2 05-Nov-1997  thorpej Update from trunk: fix lint syscall stub generation.
 1.71.2.1 21-Oct-1997  thorpej Pull up from trunk: Fix an oversight in the previous.
 1.91.2.3 08-Oct-2000  he Pull up revision 1.101 (via patch, requested by he):
Introduce the issetugid() system call.
Add manual page.
 1.91.2.2 06-Oct-2000  he Pull up revision 1.100 (requested by sommerfeld):
Introduce the issetugid() system call.
 1.91.2.1 11-Nov-1999  he Pull up revision 1.97 via patch (requested by is):
Do call graph profiling for system calls. Fixes PR#4976.
 1.96.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.102.4.3 24-Apr-2001  he Pull up revision 1.112 (requested by kleink):
Document fchroot(2).
 1.102.4.2 29-Sep-2000  kleink Pull up rev. 1.107 (approved by thorpej):
Add internal name for pipe().
 1.102.4.1 22-Aug-2000  kleink Pull up revs. 1.103-1.104 (approved by thorpej):
Add internal names for brk(), sbrk() and fork().
 1.111.2.19 17-Jan-2003  thorpej Document _lwp_getprivate(2) and _lwp_setprivate(2).
 1.111.2.18 17-Jan-2003  thorpej Add _lwp_getprivate(2) and _lwp_setprivate(2).
 1.111.2.17 15-Jan-2003  wiz Correct MLINKS: _lwp_suspend should be linked to _lwp_continue, not _lwp_create.
 1.111.2.16 14-Jan-2003  thorpej Manual pages for the LWP-related system calls.

XXX Note our current implementation mis-matches these slightly (error
codes are stuff into errno, where they should simply be returned by
these calls). This will be addressed shortly.
 1.111.2.15 08-Jan-2003  thorpej Need an internal name for kill().
 1.111.2.14 11-Nov-2002  nathanw Catch up to -current
 1.111.2.13 18-Oct-2002  nathanw Catch up to -current.
 1.111.2.12 17-Sep-2002  nathanw Catch up to -current.
 1.111.2.11 13-Aug-2002  nathanw Catch up to -current.
 1.111.2.10 02-Aug-2002  nathanw Go back to generating syscall stubs here in libc. For every syscall "foo"
listed in WEAKASM, generate the stub with entry point name "_sys_foo" and
weak aliases named "_foo" and "foo".
(likely to be replaced with a table-based system soon)
 1.111.2.9 22-Mar-2002  nathanw Catch up to -current.
 1.111.2.8 08-Mar-2002  nathanw Catch up to -current.
 1.111.2.7 29-Jan-2002  nathanw Actual syscall generation has moved to libsyscall.
 1.111.2.6 28-Jan-2002  nathanw Catch up to -current.
 1.111.2.5 17-Nov-2001  briggs Remove timer_*.c files and alphabetize/remove dups in the timer_*.S list.
 1.111.2.4 17-Nov-2001  nathanw Timer syscalls exist now.
 1.111.2.3 14-Nov-2001  nathanw Catch up to -current.
 1.111.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.111.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.112.2.1 10-Jul-2001  lukem add kevent.o, kqueue.o, kqueue.2, kevent.2
 1.124.2.1 11-Nov-2002  he Pull up revision 1.128 (requested by thorpej in ticket #803):
Fix some problems using makelintstub as a cross-tool:
o Require that the path to the C preprocessor be passed
in the CPP environment variable, and use it rather than
hard-coding "cpp". Provide the target's preprocessor
when invoking makelintstub.
o Fix some quoting issues found with Solaris 8's XPG4 sh
and sed.
o Do not use "echo -n". The resulting whitespace is not
supposed to be syntactically significant anyway.
 1.156.2.1 20-Mar-2005  tron Pull up revision 1.157 (requested by kleink in ticket #27):
Interpose cancellation points in pollts() and pselect(), bringing us
to libc.so.12.127 and libpthread.so.0.6.
 1.176.4.3 23-Mar-2008  matt sync with HEAD
 1.176.4.2 09-Jan-2008  matt sync with HEAD
 1.176.4.1 06-Nov-2007  matt sync with HEAD
 1.186.4.2 17-Jun-2008  yamt sync with head.
 1.186.4.1 18-May-2008  yamt sync with head.
 1.187.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.187.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.196.4.3 09-Nov-2008  christos fix fhstat.
 1.196.4.2 08-Nov-2008  christos time_t changes
 1.196.4.1 26-Oct-2008  christos file Makefile.inc was added on branch christos-time_t on 2008-11-08 21:45:38 +0000
 1.196.2.3 17-Sep-2011  bouyer Pull up following revision(s) (requested by manu in ticket #1658):
sys/rump/include/rump/rump_syscalls.h: revision 1.52 via patch
sys/kern/init_sysent.c: revision 1.257 via patch
sys/rump/include/rump/rumpvnode_if.h: revision 1.12 via patch
lib/libc/sys/Makefile.inc: revision 1.208 via patch
sys/sys/syscallargs.h: revision 1.227 via patch
sys/kern/kern_exec.c: revision 1.317 via patch
sys/rump/librump/rumpkern/rump_syscalls.c: revision 1.74 via patch
include/limits.h: revision 1.30 via patch
sys/kern/syscalls.master: revision 1.251 via patch
sys/sys/vnode_if.h: revision 1.83 via patch
sys/sys/fcntl.h: revision 1.40 via patch
sys/sys/fcntl.h: revision 1.41 via patch
sys/kern/vfs_syscalls.c: revision 1.433 via patch
sys/rump/librump/rumpvfs/rumpvnode_if.c: revision 1.11 via patch
sys/kern/syscalls.c: revision 1.248 via patch
sys/sys/syscall.h: revision 1.244 via patch
lib/libc/sys/link.2: revision 1.25 via patch
include/unistd.h: revision 1.127 via patch
distrib/sets/lists/comp/mi: revision 1.1659 via patch
sys/sys/stat.h: revision 1.61 via patch
First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.
Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
regen
improve comment about AT_* defines: they are not only used by linkat(2)
Add macros to hide OpenGroup extened API set 2 from GNU configure. This
is a temporary workaround until the implementation is completed.
 1.196.2.2 17-Jul-2011  riz Pull up following revision(s) (requested by manu in ticket #1645):
lib/libc/sys/Makefile.inc 1.207 via patch
lib/libc/sys/extattr_get_file.2 patch
lib/libpuffs/dispatcher.c 1.34,1.36 via patch
lib/libpuffs/puffs.c 1.107 via patch
lib/libpuffs/puffs.h 1.115,1.118 via patch
sys/fs/puffs/puffs_msgif.h 1.71,1.76 via patch
sys/fs/puffs/puffs_vfsops.c 1.88 via patch
sys/fs/puffs/puffs_vnops.c 1.145,1.154 via patch
sys/kern/vfs_xattr.c 1.24-1.27 via patch
sys/kern/vnode_if.c 1.87 via patch
sys/sys/Makefile 1.133 via patch
sys/sys/extattr.h 1.6 via patch
sys/sys/vnode_if.h 1.81 via patch
sys/ufs/ffs/ffs_vnops.c patch
sys/ufs/ufs/ufs_extattr.c 1.31,1.34 via patch

* support extended attributes
* bump major due to structure growth
* add some spare space
* remove ABI sillyness
Support extended attributes.
Fix multiple non compliances in our Linux-like extattr API, and make it
public so that it can be used.
Improve a bit listxattr(2). It attemps to list both system and user
extended attributes, and it faled if calling user did not have privilege
for reading system EA. Now we just lise user EA and skip system EA in
reading them is not allowed.
Fix bug introduced in previous commuit: Do not vrele() a vnode we did not
obtained.
Improve UFS1 extended attributes usability
- autocreate attribute backing file for new attributes
- autoload attributes when issuing extattrctl start
- when autoloading attributes, do not display garbage warning when looking
up entries that got ENOENT
Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.
There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
extattr_list_file(2), which is obtanined by setting the
EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)
This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.
 1.196.2.1 02-Feb-2009  snj Pull up following revision(s) (requested by martin in ticket #374):
lib/libc/sys/Makefile.inc: revision 1.200
__posix_fadvise50() does not use the standard errno behaviour, but returns
the error value itself - so move it from ASM to NOERR. Pointed out by
Nick. I have no idea how/if this ever could have worked, but I would swear
I realy tested it when I last touched it! Fixes the sys/fs/posix_fadvise
regression test.
 1.200.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.204.2.1 20-Jan-2011  bouyer Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
as parameter a path to a mount point, and a prop_dictionary
(in plistref format) describing commands and arguments.
For each command, status and data are returned as a prop_dictionary.
quota commands features will be added to take advantage of this,
exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
ffs (and playing nicely with wapbl).
Quotas are enabled on a ffs filesystem via superblock flags.
tunefs(8) can enable or disable quotas.
On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
block and inode usages, and will check and update quotas in Pass 6.
quota usage and limits are stored in unliked files (one for users,
one for groups)l fsck_ffs(8) will create the files if needed, or
free them if needed. This means that after enabling or disabling
quotas on a filesystem; a fsck_ffs(8) run is required.
quotacheck(8) is not needed any more, on a unclean shutdown
fsck or journal replay will take care of fixing quotas.
newfs(8) can create a ready-to-mount quota-enabled filesystem
(superblock flags are set and quota inodes are created).
Other new features or semantic changes:
- default quota datas, applied to users or groups which don't already
have a quota entry
- per-user/group grace time (instead of a filesystem global one)
- 0 really means "nothing allowed at all", not "no limit".
If you want "no limit", set the limit to UQUAD_MAX (tools will
understand "unlimited" and "-")

A quota file is structured as follow:
it starts with a header, containing a few per-filesystem values,
and the default quota limits.
Quota entries are linked together as a simple list, each entry has a
pointer (as an offset withing the file) to the next.
The header has a pointer to a list of free quota entries, and
a hash table of in-use entries. The size of the hash table depends
on the filesystem block size (header+hash table should fit in the
first block). The file is not sparse and is a multiple of
filesystem block size (when the free quota entry list is empty a new
filesystem block is allocated). quota entries to not cross
filesystem block boundaries.

In memory, the kernel keeps a cache of recently used quota entries
as a reference to the block number, and offset withing the block.
The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
update repquota, edquota and rpc.rquotad to the new world
implement compat_50_quotactl ioctl.
update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.
 1.209.2.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.209.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.209.2.2 30-Oct-2012  yamt sync with head
 1.209.2.1 17-Apr-2012  yamt sync with head
 1.216.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.216.2.2 23-Jun-2013  tls resync from head
 1.216.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.223.2.1 10-Aug-2014  tls Rebase.
 1.224.2.1 08-Feb-2015  snj Pull up following revision(s) (requested by christos in ticket #472):
lib/libc/include/namespace.h: revision 1.175
lib/libc/sys/Makefile.inc: revision 1.225, 1.227
lib/libc/sys/fdiscard.2: revision 1.3
lib/libc/sys/fdiscard.c: revision 1.1
lib/libc/sys/posix_fallocate.c: revision 1.1
Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
--
PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno, so make it PSEUDO_NOERROR, by adding a new
category GLUENOERR.
--
PR/49617: Kirk Russell: Describe the posix_fallocate return values correctly.
 1.231.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.231.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.231.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.238.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.238.4.1 10-Jun-2019  christos Sync with HEAD
 1.238.2.2 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.238.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.240.2.1 05-Oct-2021  martin Pull up following revision(s) (requested by christos in ticket #1355):

lib/libpthread/pthread_cancelstub.c: revision 1.39
lib/libc/sys/Makefile.inc: revision 1.247
lib/libpthread/pthread_cancelstub.c: revision 1.40

PR/56424: Clay Mayers: recvfrom() is not a cancelation point as documented
in pthread_setcanceltype.3

remove parameter names from decls.
 1.255.2.1 02-Aug-2025  perseant Sync with HEAD
 1.4 31-Jul-2022  dholland __quotactl(2): typo.
 1.3 13-Feb-2012  dholland branches: 1.3.4;
Fix wrong xref; wrote quotactl(8), meant quotacheck(8). ok riz@
 1.2 13-Feb-2012  wiz Merge descriptions for same error code.
 1.1 13-Feb-2012  dholland Quota-related docs fixes:

- Remove old quotactl(2); replace with new __quotactl(2).
- Document quota_getrestrictions(3), the semantic restriction codes,
and quota_quotaon/off(3).
- Update VFS_QUOTACTL(9), which was still describing the pre-proplib API.

Approved by releng for the freeze.
 1.3.4.2 17-Apr-2012  yamt sync with head
 1.3.4.1 13-Feb-2012  yamt file __quotactl.2 was added on branch yamt-pagecache on 2012-04-17 00:05:25 +0000
 1.2 16-Jan-2009  christos don't use glue for semctl, the number of underscores makes this an intractable
problem :-) Use regular wrappers like we do with sigtimedwait.
 1.1 15-Jan-2009  christos fix the semctl glue build that worked before by chance by side effects of
building the the assembly stub as a normal stub. Just build it as a glue
stub.
 1.7 11-Jan-2009  christos merge christos-time_t
 1.6 28-Apr-2008  martin branches: 1.6.8;
Remove clause 3 and 4 from TNF licenses
 1.5 18-Jan-2003  thorpej branches: 1.5.30;
Merge the nathanw_sa branch.
 1.4 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.3 03-Jan-2002  tron Reference variable "ap" in lint dummy code to avoid warning about
unnecessary assignment.
 1.2 03-Jan-2002  thorpej Don't assign semun if __lint__.
 1.1 31-Jan-2000  christos branches: 1.1.6;
Add a userland stub to do the union semun -> union semun * redirection.
 1.1.6.2 21-Jun-2002  nathanw Catch up to -current.
 1.1.6.1 28-Jan-2002  nathanw Catch up to -current.
 1.5.30.1 18-May-2008  yamt sync with head.
 1.6.8.2 10-Nov-2008  christos this completes the symbol implementation for now. New we need to debug...
 1.6.8.1 28-Apr-2008  christos file __semctl13.c was added on branch christos-time_t on 2008-11-10 00:13:02 +0000
 1.3 01-Nov-2021  thorpej Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
 1.2 27-Oct-2021  thorpej - Use the signal trampoline version constants from <sys/signal.h>.
- Declare the sigtramp externs as as char arrays, not int arrays; not all
platforms have fixed-sized 32-bit instructions.
 1.1 26-Oct-2021  christos Merge all MD __sigaction14_sigtramp.c copies into one:
- sparc and sparc64 were not using version 0 sigcontext when there were
no arguments in the signal version. This was probably a bug.
- vax is using +1 the version numbers of the other archs.
- Only hppa was defining __LIBC12_SOURCE__ so it was getting a working
sigcontext before. all the other ports that supported sigcontext had
the compat code disabled.
[pointed out by thorpej, thanks!]
If we want to remove sigcontext support from userland at least now there
is less work to do so.
 1.2 23-Jan-2024  christos fix nested extern warnings
 1.1 01-Nov-2021  thorpej Version the sigaction(2) libc wrapper. The new version uses the "siginfo"
trampoline exclusively, thus relegating "sigcontext"-style handlers (which
have not been documented for many years now) to the dustbin of the compat
library.
 1.2 13-Sep-2005  christos compat core reorg.
 1.1 19-Aug-2005  christos 64 bit inode changes
 1.7 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.6 21-Oct-2009  snj branches: 1.6.6; 1.6.12;
Remove 3rd and 4th clauses in christos' license. OK christos.
 1.5 13-Sep-2005  christos compat core reorg.
 1.4 30-Jul-2005  christos - Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror
 1.3 12-Jun-2005  lukem Add missing __RCSID()
 1.2 26-Jun-2000  kleink branches: 1.2.2;
De-delint.
 1.1 23-Jun-2000  kleink Add internal names for brk() and sbrk().
 1.2.2.2 28-Jul-2000  kleink Pull up revs. 1.1-1.2 (approved by thorpej):
Add internal names for brk(), sbrk() and fork().
 1.2.2.1 26-Jun-2000  kleink file _brk.c was added on branch netbsd-1-5 on 2000-07-28 23:07:29 +0000
 1.6.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.20 18-Oct-2022  wiz avoid unnecessary Ns macro
 1.19 18-Oct-2022  jschauma Note that the exit status may be truncated to the least significant 8 bits.
 1.18 08-Sep-2003  wiz Use St -isoC-9X instead of St -isoC9X, to be in sync with groff.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 01-Mar-2003  bjh21 Add _Exit(), for C99 and POSIX-2001.
Proposed on tech-userlevel to a resounding silence in April last year.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.11 02-Dec-1999  kleink branches: 1.11.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 22-Mar-1999  garbled branches: 1.10.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9 28-Apr-1998  fair fix mdoc references
 1.8 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.7 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 17-Oct-1994  cgd either change or update references to sigvec(), as appropriate
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 04-Oct-1993  jtc Remove "volatile" from function declaration in SYNOPSIS. We may want to
replace it with __dead, but volatile is clearly wrong.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.6 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.5 21-Oct-2009  snj branches: 1.5.6; 1.5.12;
Remove 3rd and 4th clauses in christos' license. OK christos.
 1.4 13-Sep-2005  christos compat core reorg.
 1.3 30-Jul-2005  christos - Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror
 1.2 12-Jun-2005  lukem Add missing __RCSID()
 1.1 26-Jun-2000  kleink branches: 1.1.2;
Need an internal name for fork().
 1.1.2.2 28-Jul-2000  kleink Pull up rev. 1.1 (approved by thorpej):
Add internal names for brk(), sbrk() and fork().
 1.1.2.1 26-Jun-2000  kleink file _fork.c was added on branch netbsd-1-5 on 2000-07-28 23:09:37 +0000
 1.5.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.5 21-Oct-2009  snj branches: 1.5.6; 1.5.12;
Remove 3rd and 4th clauses in christos' license. OK christos.
 1.4 12-Jun-2005  lukem Add missing __RCSID()
 1.3 21-Jan-2003  kleink A function wrapper cannot be used for getcontext(), so error out
if neither weak aliases nor indirect references are available.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file _getcontext.c was initially added on branch nathanw_sa.
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.5.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 29-Nov-2015  wiz Drop trailing whitespace.
 1.1 29-Nov-2015  pgoyette Initial documentation of the internal syscalls that implement the librt
posix semaphores. As requested in PR kern/37427

XXX Feel free to expand this page!
 1.11 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.10 04-Dec-2022  uwe lib: Mark up error names in man pages with .Er
 1.9 22-Aug-2021  andvar s/priviledge/privilege/ in comments/log messages and fix one typo in descriptor.
 1.8 31-Jul-2021  andvar s/dependend/dependent/
 1.7 23-Apr-2017  wiz Sort errors.
 1.6 21-Apr-2017  christos Mention that the signal stack of the newly created lwp is reset to disabled.
 1.5 21-May-2012  martin branches: 1.5.14; 1.5.18;
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.
 1.4 30-Apr-2008  martin branches: 1.4.4; 1.4.8; 1.4.24;
Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 14-Jan-2003  thorpej branches: 1.1.2;
file _lwp_create.2 was initially added on branch nathanw_sa.
 1.1.2.4 17-Jan-2003  wiz _lwp_makecontext is in section 3.
 1.1.2.3 15-Jan-2003  wiz Typo fix.
 1.1.2.2 15-Jan-2003  wiz Trailing whitespace.
 1.1.2.1 14-Jan-2003  thorpej Manual pages for the LWP-related system calls.

XXX Note our current implementation mis-matches these slightly (error
codes are stuff into errno, where they should simply be returned by
these calls). This will be addressed shortly.
 1.3.30.1 18-May-2008  yamt sync with head.
 1.4.24.1 21-May-2012  riz Pull up following revision(s) (requested by martin in ticket #274):
sys/arch/amd64/amd64/process_machdep.c: revision 1.20
sys/kern/sys_lwp.c: revision 1.54
sys/arch/sparc64/sparc64/machdep.c: revision 1.267
sys/arch/mips/mips/cpu_subr.c: revision 1.16
sys/arch/vax/vax/machdep.c: revision 1.188
sys/sys/lwp.h: revision 1.161
sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.98
sys/arch/alpha/alpha/machdep.c: revision 1.339
sys/compat/sys/ucontext.h: revision 1.6
sys/arch/hppa/hppa/hppa_machdep.c: revision 1.28
distrib/sets/lists/tests/mi: revision 1.469
sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.42
tests/lib/libc/sys/t_lwp_create.c: revision 1.1
tests/lib/libc/sys/Makefile: revision 1.23
sys/arch/arm/arm/sig_machdep.c: revision 1.42
sys/arch/amd64/include/mcontext.h: revision 1.15
sys/arch/amd64/amd64/machdep.c: revision 1.183
sys/arch/sh3/sh3/sh3_machdep.c: revision 1.99
sys/arch/i386/i386/machdep.c: revision 1.727
sys/compat/netbsd32/netbsd32_lwp.c: revision 1.13
sys/arch/sparc/sparc/machdep.c: revision 1.319
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.76
sys/arch/m68k/m68k/sig_machdep.c: revision 1.49
sys/sys/ucontext.h: revision 1.16
sys/arch/mips/mips/netbsd32_machdep.c: revision 1.9
lib/libc/sys/_lwp_create.2: revision 1.5
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.
To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.
Add an exhaustive atf test case, based partly on code from Joel Sing.
Should finally fix the remaining open part of PR kern/43903.
 1.4.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4.8.1 30-Apr-2008  martin file _lwp_create.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.4.4.1 23-May-2012  yamt sync with head.
 1.5.18.1 21-Apr-2017  bouyer Sync with HEAD
 1.5.14.1 26-Apr-2017  pgoyette Sync with HEAD
 1.6 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.5 13-Apr-2012  yamt needs sys/lwpctl.h for constants
 1.4 14-Mar-2012  jruoho Use more markup.
 1.3 17-Feb-2009  njoly branches: 1.3.6;
Fix mdoc warning (missing .El directive). While here, use a single
list for multiple items.
 1.2 05-May-2008  yamt branches: 1.2.8; 1.2.10;
document LWPCTL_FEATURE_PCTR.
 1.1 14-Dec-2007  yamt branches: 1.1.2; 1.1.6;
document following system calls.
_lwp_ctl
_lwp_getname
_lwp_setname
 1.1.6.1 18-May-2008  yamt sync with head.
 1.1.2.2 09-Jan-2008  matt sync with HEAD
 1.1.2.1 14-Dec-2007  matt file _lwp_ctl.2 was added on branch matt-armv6 on 2008-01-09 01:34:18 +0000
 1.2.10.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.2.8.2 05-May-2008  yamt document LWPCTL_FEATURE_PCTR.
 1.2.8.1 05-May-2008  yamt file _lwp_ctl.2 was added on branch christos-time_t on 2008-05-05 05:04:07 +0000
 1.3.6.1 17-Apr-2012  yamt sync with head
 1.5 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.4 30-Apr-2008  martin branches: 1.4.8;
Convert TNF licenses to new 2 clause variant
 1.3 10-Feb-2007  ad branches: 1.3.10;
- Sync with reality.
- Fix date.
 1.2 20-Jan-2007  wiz Drop trailing whitespace.
 1.1 20-Jan-2007  ad Manual pages for new LWP system calls. Not enabled in the Makefile.
 1.3.10.1 18-May-2008  yamt sync with head.
 1.4.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4.8.1 30-Apr-2008  martin file _lwp_detach.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.5 30-Apr-2008  martin branches: 1.5.8;
Convert TNF licenses to new 2 clause variant
 1.4 16-Apr-2003  wiz branches: 1.4.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 19-Jan-2003  wiz Drop trailing comma in SEE ALSO.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 14-Jan-2003  thorpej branches: 1.1.2;
file _lwp_exit.2 was initially added on branch nathanw_sa.
 1.1.2.2 15-Jan-2003  wiz Trailing whitespace.
 1.1.2.1 14-Jan-2003  thorpej Manual pages for the LWP-related system calls.

XXX Note our current implementation mis-matches these slightly (error
codes are stuff into errno, where they should simply be returned by
these calls). This will be addressed shortly.
 1.4.30.1 18-May-2008  yamt sync with head.
 1.5.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5.8.1 30-Apr-2008  martin file _lwp_exit.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.3 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.2 18-May-2009  wiz Sort SEE ALSO.
 1.1 14-Dec-2007  yamt branches: 1.1.2;
document following system calls.
_lwp_ctl
_lwp_getname
_lwp_setname
 1.1.2.2 09-Jan-2008  matt sync with HEAD
 1.1.2.1 14-Dec-2007  matt file _lwp_getname.2 was added on branch matt-armv6 on 2008-01-09 01:34:19 +0000
 1.6 05-Oct-2013  njoly Add missing El macro.
 1.5 06-Sep-2013  yamt document MD ways to access private data for some platforms
 1.4 30-Apr-2008  martin branches: 1.4.4; 1.4.8; 1.4.28;
Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 17-Jan-2003  thorpej branches: 1.1.2;
file _lwp_getprivate.2 was initially added on branch nathanw_sa.
 1.1.2.2 17-Jan-2003  wiz Drop trailing whitespace (fix the template, Jason, please).
 1.1.2.1 17-Jan-2003  thorpej Document _lwp_getprivate(2) and _lwp_setprivate(2).
 1.3.30.1 18-May-2008  yamt sync with head.
 1.4.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4.8.1 30-Apr-2008  martin file _lwp_getprivate.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 22-Apr-2020  thorpej Remove man page for the never-exposed _lwp_gettid(2) call.
 1.1 04-Apr-2020  thorpej branches: 1.1.2;
Man page for _lwp_gettid(2).

(Not yet installed, pending adding the libc stub.)
 1.1.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.1.2.1 04-Apr-2020  martin file _lwp_gettid.2 was added on branch phil-wifi on 2020-04-08 14:07:13 +0000
 1.5 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.4 24-Jun-2009  zafer fix spelling error.
 1.3 30-Apr-2008  martin branches: 1.3.8;
Convert TNF licenses to new 2 clause variant
 1.2 10-Feb-2007  ad branches: 1.2.10;
- Sync with reality.
- Fix date.
 1.1 20-Jan-2007  ad Manual pages for new LWP system calls. Not enabled in the Makefile.
 1.2.10.1 18-May-2008  yamt sync with head.
 1.3.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3.8.1 30-Apr-2008  martin file _lwp_kill.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.13 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.12 31-Jul-2019  pgoyette Fix a couple of typos
 1.11 08-Dec-2017  wiz branches: 1.11.4;
Remove trailing whitespace.
 1.10 08-Dec-2017  christos make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8
 1.9 31-Jan-2014  wiz Fix prototype in SYNOPSIS, mark up NULL with Dv.
 1.8 31-Jan-2014  christos expose __lwp_park60
 1.7 30-Apr-2008  martin branches: 1.7.4; 1.7.8; 1.7.28;
Convert TNF licenses to new 2 clause variant
 1.6 25-Sep-2007  tnn branches: 1.6.6;
remove extraneous "has"
 1.5 07-Aug-2007  ad branches: 1.5.2;
Change the signature of _lwp_park() to accept an lwpid_t and second
hint pointer, but do so in a way that remains compatible with older
pthread libraries. This can be used to wake another thread before the
calling thread goes asleep, saving at least one syscall + involuntary
context switch. This turns out to be a fairly large win on the condvar
benchmarks that I have tried.
 1.4 10-Feb-2007  ad - Sync with reality.
- Fix date.
 1.3 20-Jan-2007  wiz Sort ERRORS section.
 1.2 20-Jan-2007  wiz Drop trailing whitespace.
 1.1 20-Jan-2007  ad Manual pages for new LWP system calls. Not enabled in the Makefile.
 1.5.2.1 06-Nov-2007  matt sync with HEAD
 1.6.6.1 18-May-2008  yamt sync with head.
 1.7.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.7.8.1 30-Apr-2008  martin file _lwp_park.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.7.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4 30-Apr-2008  martin branches: 1.4.8;
Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 14-Jan-2003  thorpej branches: 1.1.2;
file _lwp_self.2 was initially added on branch nathanw_sa.
 1.1.2.2 15-Jan-2003  wiz Trailing whitespace.
 1.1.2.1 14-Jan-2003  thorpej Manual pages for the LWP-related system calls.

XXX Note our current implementation mis-matches these slightly (error
codes are stuff into errno, where they should simply be returned by
these calls). This will be addressed shortly.
 1.3.30.1 18-May-2008  yamt sync with head.
 1.4.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4.8.1 30-Apr-2008  martin file _lwp_self.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.3 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.2 18-May-2009  wiz Sort SEE ALSO.
 1.1 14-Dec-2007  yamt branches: 1.1.2;
document following system calls.
_lwp_ctl
_lwp_getname
_lwp_setname
 1.1.2.2 09-Jan-2008  matt sync with HEAD
 1.1.2.1 14-Dec-2007  matt file _lwp_setname.2 was added on branch matt-armv6 on 2008-01-09 01:34:19 +0000
 1.6 04-Dec-2022  uwe Bump date for the fixed RETURN VALUES in previous
 1.5 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.4 30-Apr-2008  martin branches: 1.4.8;
Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 14-Jan-2003  thorpej branches: 1.1.2;
file _lwp_suspend.2 was initially added on branch nathanw_sa.
 1.1.2.3 15-Jan-2003  wiz Trailing whitespace.
 1.1.2.2 14-Jan-2003  nathanw _lwp_continue, not _lwp_resume.
 1.1.2.1 14-Jan-2003  thorpej Manual pages for the LWP-related system calls.

XXX Note our current implementation mis-matches these slightly (error
codes are stuff into errno, where they should simply be returned by
these calls). This will be addressed shortly.
 1.3.30.1 18-May-2008  yamt sync with head.
 1.4.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4.8.1 30-Apr-2008  martin file _lwp_suspend.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.5 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.4 02-Nov-2010  skrll Spell immediately correctly.
 1.3 30-Apr-2008  martin branches: 1.3.8;
Convert TNF licenses to new 2 clause variant
 1.2 10-Feb-2007  ad branches: 1.2.10;
- Sync with reality.
- Fix date.
 1.1 20-Jan-2007  ad Manual pages for new LWP system calls. Not enabled in the Makefile.
 1.2.10.1 18-May-2008  yamt sync with head.
 1.3.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3.8.1 30-Apr-2008  martin file _lwp_unpark.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.8 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.7 08-Apr-2014  pooka play the "documentation matches implementation" game
 1.6 02-Nov-2010  skrll branches: 1.6.6; 1.6.12; 1.6.22;
Spell immediately correctly.
 1.5 30-Apr-2008  martin branches: 1.5.8;
Convert TNF licenses to new 2 clause variant
 1.4 17-Feb-2007  wiz branches: 1.4.10;
Fix Dd argument.
 1.3 10-Feb-2007  ad - Sync with reality.
- Fix date.
 1.2 20-Jan-2007  wiz Sort ERRORS section.
 1.1 20-Jan-2007  ad Manual pages for new LWP system calls. Not enabled in the Makefile.
 1.4.10.1 18-May-2008  yamt sync with head.
 1.5.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5.8.1 30-Apr-2008  martin file _lwp_unpark_all.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.6.22.1 10-Aug-2014  tls Rebase.
 1.6.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7 04-Dec-2022  uwe Bump date for the fixed RETURN VALUES in previous
 1.6 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.5 23-Feb-2020  ad +EINVAL
 1.4 30-Apr-2008  martin branches: 1.4.8; 1.4.64;
Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 14-Jan-2003  thorpej branches: 1.1.2;
file _lwp_wait.2 was initially added on branch nathanw_sa.
 1.1.2.4 15-Jan-2003  wiz .Dv NULL.
 1.1.2.3 15-Jan-2003  wiz Typo fix.
 1.1.2.2 15-Jan-2003  wiz Trailing whitespace.
 1.1.2.1 14-Jan-2003  thorpej Manual pages for the LWP-related system calls.

XXX Note our current implementation mis-matches these slightly (error
codes are stuff into errno, where they should simply be returned by
these calls). This will be addressed shortly.
 1.3.30.1 18-May-2008  yamt sync with head.
 1.4.64.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4.8.1 30-Apr-2008  martin file _lwp_wait.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.7 04-Dec-2022  uwe Bump date for the fixed RETURN VALUES in previous
 1.6 04-Dec-2022  uwe Tweak markup in _lwp_*(2) manual pages

Use .Rv where possible. Some manual pages claimed that the error "is
returned", but RTFS and some quick testing indicate that this is wrong.

The commit message from 2003 says that:

Note our current implementation mis-matches [man pages] slightly
(error codes are stuffed into errno, where they should simply be
returned by these calls). This will be addressed shortly.

That hasn't happened in the 20 years, so we might as well make the man
pages reflect the reality.
 1.5 30-Apr-2008  martin branches: 1.5.8;
Convert TNF licenses to new 2 clause variant
 1.4 16-Apr-2003  wiz branches: 1.4.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 31-Jan-2003  jdolecek use right function name in HISOTRY, this is not _lwp_create(2)
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 14-Jan-2003  thorpej branches: 1.1.2;
file _lwp_wakeup.2 was initially added on branch nathanw_sa.
 1.1.2.2 15-Jan-2003  wiz Trailing whitespace.
 1.1.2.1 14-Jan-2003  thorpej Manual pages for the LWP-related system calls.

XXX Note our current implementation mis-matches these slightly (error
codes are stuff into errno, where they should simply be returned by
these calls). This will be addressed shortly.
 1.4.30.1 18-May-2008  yamt sync with head.
 1.5.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5.8.1 30-Apr-2008  martin file _lwp_wakeup.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.8 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.7 21-Oct-2009  snj branches: 1.7.6; 1.7.12;
Remove 3rd and 4th clauses in christos' license. OK christos.
 1.6 13-Sep-2005  christos compat core reorg.
 1.5 30-Jul-2005  christos - Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror
 1.4 12-Jun-2005  lukem Add missing __RCSID()
 1.3 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.2 23-Apr-2001  wiz Dummy commit to kill -kk.
 1.1 28-Sep-2000  kleink branches: 1.1.2; 1.1.4;
Need an internal name for pipe(2).
 1.1.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.1.2.2 29-Sep-2000  kleink Pull up rev. 1.1 (approved by thorpej):
Add internal name for pipe().
 1.1.2.1 28-Sep-2000  kleink file _pipe.c was added on branch netbsd-1-5 on 2000-09-29 09:08:21 +0000
 1.7.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7 16-Jan-2014  christos "soon" is "now". Remove all __indr_reference crap.
 1.6 21-Oct-2009  snj branches: 1.6.6; 1.6.12;
Remove 3rd and 4th clauses in christos' license. OK christos.
 1.5 13-Sep-2005  christos compat core reorg.
 1.4 30-Jul-2005  christos - Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror
 1.3 12-Jun-2005  lukem Add missing __RCSID()
 1.2 26-Jun-2000  kleink branches: 1.2.2;
De-delint.
 1.1 23-Jun-2000  kleink Add internal names for brk() and sbrk().
 1.2.2.2 28-Jul-2000  kleink Pull up revs. 1.1-1.2 (approved by thorpej):
Add internal names for brk(), sbrk() and fork().
 1.2.2.1 26-Jun-2000  kleink file _sbrk.c was added on branch netbsd-1-5 on 2000-07-28 23:08:49 +0000
 1.6.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.37 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.36 02-Apr-2025  uwe accept(2): minor tweaks, use .Bl -column for accept4 flags
 1.35 02-Apr-2025  riastradh accept(2): Tidy up man page.
 1.34 27-Oct-2019  pgoyette branches: 1.34.10;
accept() is a function, not an argument!
 1.33 09-May-2017  abhinav branches: 1.33.10;
Add missing word.
 1.32 08-Feb-2017  maya branches: 1.32.2;
Document accept4 in accept(2)
 1.31 02-Aug-2013  wiz branches: 1.31.8; 1.31.12;
Use more markup and improve table formatting.
 1.30 02-Aug-2013  elric Update accept(2) to indicate that paccept honours SOCK_NOSIGPIPE in its
flags argument.
 1.29 19-Mar-2012  plunky branches: 1.29.2;
pselect->paccept for this page
 1.28 27-Jun-2011  wiz branches: 1.28.2;
Various minor improvements.
 1.27 26-Jun-2011  christos * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.26 02-Jun-2011  yamt compatibility note
 1.25 17-Nov-2006  rillig branches: 1.25.40;
Added EINTR and sorted the error names alphabetically.
 1.24 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.23 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.22 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.21 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.20 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.19 22-Oct-2001  kleink Sprinkle some __restrict into <sys/socket.h>.
 1.18 16-Oct-2001  kleink Remove inclusion of <sys/types.h> from synopsis; it is no longer needed.
 1.17 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.16 16-Sep-2001  wiz Boring whitespace fixes.
 1.15 19-May-2001  jdolecek Use EAGAIN instead of EWOULDBLOCK. The actual numeric value is
same, but EAGAIN is the posixly correct name.
Addresses misc/12960.
 1.14 07-Feb-2001  itojun branches: 1.14.2;
add ECONNABORTED.
 1.13 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 26-Jun-1999  sommerfeld branches: 1.12.4;
fix PR/7855
 1.11 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 18-Feb-1999  erh Add the section number to the poll xref.
 1.9 10-Feb-1999  kleink Reflect the addition of socklen_t.
 1.8 28-Jul-1998  is Mention poll(2), too, where we formerly only mentioned select(2).
 1.7 31-Jan-1996  mycroft Document EMFILE and ENFILE.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 10-Jan-1994  jtc Fix spelling errors.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.14.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.14.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.14.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.14.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.25.40.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.28.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.28.2.1 17-Apr-2012  yamt sync with head
 1.29.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.31.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.32.2.1 11-May-2017  pgoyette Sync with HEAD
 1.33.10.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.34.10.1 02-Aug-2025  perseant Sync with HEAD
 1.2 08-Feb-2017  maya branches: 1.2.2; 1.2.4;
oops, do not write the same file twice -- accidentally ran patch twice
 1.1 08-Feb-2017  maya Add accept4, a tiny wrapper around paccept.

accept4 is a syscall in Linux, FreeBSD and OpenBSD. It is used in
LLVM, zeromq, and probably others. paccept is a superset of it.

adding it to libc ensures it is used by programs and prevents the
need to define the same wrapper in every program.
 1.2.4.2 21-Apr-2017  bouyer Sync with HEAD
 1.2.4.1 08-Feb-2017  bouyer file accept4.c was added on branch bouyer-socketcan on 2017-04-21 16:53:09 +0000
 1.2.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.2.2.1 08-Feb-2017  pgoyette file accept4.c was added on branch pgoyette-localcount on 2017-03-20 06:56:58 +0000
 1.33 10-Jan-2017  abhinav Add missing word.
 1.32 13-Jan-2013  dholland branches: 1.32.12;
Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.31 12-Jan-2013  dholland One more bit: explicitly state what calls to faccessat() are equivalent
to access().
 1.30 12-Jan-2013  dholland Rewrite heavily. This was originally going to be just an improvement of
some wording related to the *at form... but it needed a general overhaul.

Add some missing errors for the *at form... plus EINVAL for the
traditional form for when you pass a bogus check mode.

Note that the AT_EACCESS flag is useless and strengthen the security
warning.
 1.29 01-Dec-2012  wiz New sentence, new line. Add articles.
 1.28 01-Dec-2012  wiz Remove trailing whitespace.
 1.27 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.26 03-May-2010  jruoho branches: 1.26.6; 1.26.12;
Note secure_path(3) in SEE ALSO.
 1.25 30-Apr-2010  jruoho Remove the note about eaccess(); no such thing in NetBSD.
 1.24 30-Apr-2010  wiz Sort errors.
 1.23 30-Apr-2010  jruoho Use a SECURITY CONSIDERATIONS instead of the BUGS section, and steal this
section from FreeBSD (with minor modifications).
 1.22 02-Feb-2006  enami Replace a period, which is left unchanged when sentense is added in
rev. 1.7, to comma.
 1.21 13-May-2004  wiz \- is a minus, not -.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.17 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 09-Jun-2000  lukem branches: 1.13.4;
fix typo
 1.12 02-Dec-1999  kleink branches: 1.12.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.8 23-Apr-1997  mycroft Rework text explaining false positives.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 01-Apr-1994  cgd delete duplicated info, from Mark Weaver
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.13.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.13.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.26.12.2 25-Feb-2013  tls resync with head
 1.26.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.6.2 23-Jan-2013  yamt sync with head
 1.26.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.32.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.19 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.18 05-Apr-2010  wiz Sort ERRORS section.
 1.17 03-Apr-2010  jruoho Trivia: one .Pp after .El, speak about NULL instead of nil pointers, etc.
 1.16 13-May-2004  wiz \- is a minus, not -.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 10-Mar-2000  enami branches: 1.10.6;
Note that this system call now creates kernel thread.
 1.9 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.8 22-Mar-1999  garbled branches: 1.8.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.7 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.4 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.21 07-Dec-2015  pgoyette Update to match reality. For these functions, we still try the system
call first, and only fall back to /dev/clockctl if the system call
fails.
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 14-Jan-2003  tsarna There is no adjust(), so adjust adjtime(2) to adjust for adjust really
being adjtime.
 1.15 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.14 12-May-2002  wiz Spelling fixes, from Sergey Svishchev in kern/16650.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Oct-2001  wiz Boring whitespace or punctuation fixes.
 1.11 16-Sep-2001  manu Added support to use the clockctl driver if present for adjtime(),
clock_settime(), ntp_adjtime() and settimeofday(). The super-user still
always use the plain system call.
Approved by Christos
 1.10 16-Sep-2001  wiz Boring whitespace fixes.
 1.9 02-Dec-1999  kleink branches: 1.9.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.8 22-Mar-1999  garbled branches: 1.8.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.7 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.6 01-Nov-1997  mycroft Nuke trailing comma in SEE ALSO section.
 1.5 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.6.7 17-Jan-2003  thorpej Sync with HEAD.
 1.9.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.9.6.5 21-Jun-2002  nathanw Catch up to -current.
 1.9.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.9.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.9.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.9.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.12 15-Oct-2011  christos close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
fopen(db, "re")
 1.11 11-Jan-2009  christos merge christos-time_t
 1.10 23-Nov-2007  uebayasi branches: 1.10.14;
KNF; no variable name in function prototype.
 1.9 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.8 07-Oct-2006  kardel branches: 1.8.8;
- simplify code
- remove any 'permission checks' via geteuid() - with upcoming
security models these might not match the model any more
- this also fixes a bug where ntp_adjtime() was denied (EPERM)
even though only a legit read status was performed
 1.7 09-Mar-2006  christos Do not use SCARG() in userland. Eliminates need for <sys/systm.h>.
 1.6 12-Jun-2005  lukem Add missing __RCSID()
 1.5 16-Jul-2003  cb Mark __clockctl_fd close-on-exec to avoid unintentionally leaking
time setting privileges across an exec.
 1.4 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.3 09-Dec-2001  manu - Changed clocktl interface to use syscallargs structures
- Implemented keep-state so that we don't have to open /dev/clockctl each time.
 1.2 17-Sep-2001  tsutsui branches: 1.2.2;
Include string.h for memcpy().
 1.1 16-Sep-2001  manu Added support to use the clockctl driver if present for adjtime(),
clock_settime(), ntp_adjtime() and settimeofday(). The super-user still
always use the plain system call.
Approved by Christos
 1.2.2.3 28-Jan-2002  nathanw Catch up to -current.
 1.2.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.2.2.1 17-Sep-2001  nathanw file adjtime.c was added on branch nathanw_sa on 2001-10-08 20:21:35 +0000
 1.8.8.1 09-Jan-2008  matt sync with HEAD
 1.10.14.1 08-Nov-2008  christos time_t changes
 1.5 12-Jun-1994  mycroft Clean up deleted files.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.32 28-Jun-2022  rillig bind.2: add references to specific protocol families

Referring the reader to "the manual entries in section 4" was too
unspecific to be useful, as that section contains device drivers as
well.
 1.31 28-Mar-2021  dholland Document EINVAL for out of range socket address lengths.

This is what happens, but wasn't documented. Applies to bind(2),
connect(2), and send(2).
 1.30 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.29 05-Apr-2015  wiz Sort errors. Bump date for previous.
 1.28 05-Apr-2015  rtr Note that bind(2) can fail with EAFNOSUPPORT. The description of why is
taken from the connect(2) manpage.
 1.27 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.26 10-Sep-2005  wiz Remove unnecessary parentheses. Add comma in enumeration.
 1.25 30-Aug-2005  jmmv Document that binding local sockets now honors the user's umask, why this
was done and that this behavior is not supposed to be portable. Filling
under the security considerations section because code not following the
guidelines given here can be "less secure".
 1.24 13-May-2004  wiz \- is a minus, not -.
 1.23 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.22 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.21 18-Mar-2003  wiz Mention namelen in DESCRIPTION. From Todd C. Miller/OpenBSD.
 1.20 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.19 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.18 16-Oct-2001  kleink Remove inclusion of <sys/types.h> from synopsis; it is no longer needed.
 1.17 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.16 16-Sep-2001  wiz Boring whitespace fixes.
 1.15 26-Jan-2000  itojun branches: 1.15.6;
EINVAL may be returned when address family mismatches. (from openbsd)
 1.14 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.13 23-Mar-1999  lukem branches: 1.13.6;
document new bind() restrictions
 1.12 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 10-Feb-1999  kleink Reflect the addition of socklen_t.
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 28-Apr-1998  fair Change occurrences of "UNIX" to .Ux or .At as appropriate.
 1.8 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.15.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.15.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.15.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.39 07-Sep-2019  wiz Add missing word. More markup.
 1.38 07-Sep-2019  wiz Punctuation nit.
 1.37 07-Sep-2019  sevan New sentence, new line
 1.36 07-Sep-2019  sevan Document the destiny for these functions.
 1.35 07-Sep-2019  sevan Document sbrk() history and adjust brk()'s.

via Ingo Schwarze <schwarze@OpenBSD>
 1.34 28-Aug-2016  wiz branches: 1.34.14;
Merge ENOMEM descriptions.
 1.33 27-Aug-2016  dholland Rework pursuant to PR 7934: be more clear about the page granularity
behavior and when new memory is zeroed.

Also, strengthen the warning about mixing with calls to malloc (which
is not a bug) and mention that the portable way to fetch the initial
break is to call sbrk(0). There are implementations in the wild where
using _end as the initial break doesn't work.
 1.32 13-May-2004  wiz \- is a minus, not -.
 1.31 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.30 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.29 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.28 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.27 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.26 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.25 16-Sep-2001  wiz Boring whitespace fixes.
 1.24 04-Apr-2000  fvdl branches: 1.24.6;
Clarify that page alignment only happens for the internal, kernel notion
of the break value.
 1.23 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.22 16-Aug-1999  is branches: 1.22.4;
repair edito in BUGS session.
 1.21 14-Jul-1999  perry Restore some information about the page rounding behavior of these
functions, with a little bit of a caution that the page rounding
behavior isn't mentioned in standards documents that mention brk/sbrk.
Klaus removed this before, but I'm not sure why, and I've been unable
to reach him about the matter after trying for several days. The
information about the behavior has always been in the page and is
important for developers to know about.
 1.20 12-Jul-1999  kleink XSH5: change function signature to `void *sbrk(intptr_t)'.
 1.19 12-Jul-1999  kleink Remove a paragraph from previous.
 1.18 09-Jul-1999  perry Note that you can find out the system page size with sysconf(3).
 1.17 06-Jul-1999  perry note in BUGS that the prototype of our sbrk is not standards compliant
and will need fixing.
 1.16 06-Jul-1999  perry Clean up this mess a lot. I believe we still have the following
issues (at least):

1) sbrk is defined as returning char *, which violates XPG
2) I'm not clear on what happens if you try to sbrk() on a negative
incr that is less than the page size. I'm guessing "nothing", but we
should document this behavior.
3) XPG says some interesting things about whether new pages are
guaranteed zeroed. We say nothing about this. We should document our
behavior.
4) It isn't clear if *we* guarantee that malloc and sbrk can be mixed
in our API (I've documented that it isn't universally portable.)

We really should clean these up, too.
 1.15 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.14 09-Mar-1999  kleink Fix a .Fa vs. .Fn bogon, and clarify somewhat.
 1.13 09-Mar-1999  kleink brk(2) actually returns an int indicating success (0) or failure (-1). Also,
change its argument to void *. (Both XSH5).
 1.12 29-Apr-1998  fair Fix bad .Xr and some .Nm abuse
 1.11 28-Apr-1998  fair fix mdoc references
 1.10 02-Feb-1998  perry merge lite-2
 1.9 27-Sep-1997  hubertf Typo: qetext -> etext; closes PR lib/4156 reported by entropy@tardis.bernstein.com
 1.8 23-Jan-1997  mikel replace <sys/types.h> with <unistd.h> and fix type of brk();
PRs 2938 and 3132.
also added xref to mmap(2).
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 10-Jan-1994  jtc Fix spelling errors.
 1.5 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.4 25-Nov-1993  jtc Misc manpage fixes.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.22.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.24.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.24.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.24.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.24.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.34.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.23 01-Sep-2019  sevan Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.22 05-Feb-2013  wiz branches: 1.22.30; 1.22.32;
Xref getcwd(3).
Sort errors.
Bump date.
 1.21 31-May-2010  njoly branches: 1.21.6; 1.21.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 02-Dec-1999  kleink branches: 1.13.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 26-Mar-1999  sommerfe branches: 1.12.6;
Document new chroot-related restrictions on fchdir, chroot, and ptrace
made possible by the kernel getcwd infrastructure
 1.11 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.8 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 10-Jan-1994  jtc Fix spelling errors.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.21.12.1 25-Feb-2013  tls resync with head
 1.21.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.22.32.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.22.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.28 08-Jun-2013  kardel Bring description in sync with errors-section and implementation reality.
(changing super-user only flags is not silently ignored)
 1.27 06-Aug-2011  jruoho branches: 1.27.2; 1.27.8;
Xref chflags(2) and stat_flags(3) with each other.
 1.26 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.25 21-Oct-2006  rillig Added a cross reference to stat(2), since that's the way how the current
flags can be determined.
 1.24 13-May-2004  wiz \- is a minus, not -.
 1.23 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.22 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.21 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.20 07-Jul-2002  bjh21 Mention lchflags in the NAME section.
 1.19 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.18 16-Sep-2001  wiz Boring whitespace fixes.
 1.17 17-Jun-2000  hubertf branches: 1.17.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.16 17-Apr-2000  mrg branches: 1.16.2;
implement lchflags(2), which does the chflags(2) dance without following
symlinks, and thus can operate on symlinks. remove a bogus comment in
chflags(1) that claims symlinks do not have file flags.

XXX: todo -- make chflags(1) use lchflags(2) when given the right options.
 1.15 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.14 31-Jul-1999  christos branches: 1.14.4;
Add note that only the super-user may set or reset any flags on block
and character devices. [Commit by cjs.]
 1.13 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.11 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.10 02-Feb-1998  perry merge lite-2
 1.9 23-Apr-1997  mikel document new reasons why {,f}chflags() can return EPERM; fixes
PR kern/3491. also, fix typo found by Paul Boven.
 1.8 22-Apr-1997  mikel add missing opaque and archived bits; from Paul Boven in PR kern/3491.
also fixed some formatting nits.
 1.7 05-Mar-1997  mikel fix broken xref, add entries for EOPNOTSUPP, and indicate that this
syscall arrived in 4.4BSD.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.4 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.14.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.17.4.4 01-Aug-2002  nathanw Catch up to -current.
 1.17.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.17.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.17.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.27.8.1 23-Jun-2013  tls resync from head
 1.27.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.49 19-Nov-2021  wiz Mention that fchmod conforms to XPG 4.2. Bump date.
 1.48 01-Sep-2019  sevan Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.47 15-Oct-2013  njoly branches: 1.47.26; 1.47.28;
Adjust needed includes for fchmodat/mkdirat/mkfifoat/mknodat/fstatat
syscalls.
 1.46 29-Jul-2013  njoly Add chmodat(2) specific errors.
 1.45 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.44 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.43 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
 1.42 01-Dec-2012  wiz Remove trailing whitespace.
 1.41 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.40 04-Mar-2012  wiz branches: 1.40.2;
Sort error descriptions.
 1.39 04-Mar-2012  dholland Clarify description of sticky bit, based on a 3-year-old suggestion by
Hubert Feyrer.
 1.38 12-Oct-2011  christos branches: 1.38.2;
Remove duplicate documentation that is mentioned in stickt(7)
 1.37 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.36 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.35 11-Jan-2009  christos merge christos-time_t
 1.34 04-Jan-2009  dholland SEE ALSO getmode(3)/setmode(3).
Suggested in passing by Joerg a long time ago on tech-pkg, seems like
a good idea.
Bump date.
 1.33 05-Sep-2008  dholland branches: 1.33.4; 1.33.6;
Clarify that the historic V7 sticky file semantics no longer apply.
 1.32 09-Jan-2007  wiz branches: 1.32.12;
Bump date for previous.
 1.31 09-Jan-2007  rillig chmod fails with EPERM when you try to set the S_ISGID bit on a file
whose group isn't one of your groups.
 1.30 06-Jan-2005  ginsbach Add EPERM to fchmod() failure list.
 1.29 13-May-2004  wiz \- is a minus, not -.
 1.28 30-Jan-2004  wiz Sort SEE ALSO.
 1.27 30-Jan-2004  christos cross reference sticky(7)
 1.26 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.25 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.24 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.23 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.22 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.21 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.20 16-Sep-2001  wiz Boring whitespace fixes.
 1.19 02-Dec-1999  kleink branches: 1.19.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.18 26-Sep-1999  jdolecek xref symlink(7)
 1.17 22-Mar-1999  garbled branches: 1.17.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.16 06-Jul-1998  fair add .Xr chflags 2 - this is another meta-data-modifying system call
 1.15 11-Oct-1997  enami Sort SEE ALSO list.
 1.14 11-Oct-1997  enami Don't use capital letter for function name and argument.
 1.13 06-Oct-1997  enami Acutally, lchmod, lchown and lutimes may set errno to ELOOP.
 1.12 06-Oct-1997  enami Add C library interface for new system call lchmod, lchown and lutimes.
 1.11 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.10 12-Jul-1997  perry document EFTYPE error return (from der Mouse, pr-3476)
 1.9 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.8 13-May-1997  kleink Update to the new `chown(2) vs. (S_ISUID|S_ISGID)' world order.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 04-Oct-1993  jtc Add #include <sys/types.h> to SYNOPSIS, as it needs to be included too.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.17.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.19.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.19.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.19.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.19.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.19.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.32.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.33.6.2 04-Jan-2009  christos merge with head.
 1.33.6.1 05-Sep-2008  christos file chmod.2 was added on branch christos-time_t on 2009-01-04 17:02:20 +0000
 1.33.4.1 16-Jan-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #272):
lib/libc/gen/setmode.3: revision 1.19, 1.20
lib/libc/sys/chmod.2: revision 1.34
SEE ALSO getmode(3)/setmode(3).
Suggested in passing by Joerg a long time ago on tech-pkg, seems like
a good idea.
Bump date.
Rework the text to make it clearer; it was really pretty confusing before.
Add an example; note some bugs/shortcomings. Bump date.
Fix HTML output.
 1.38.2.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.38.2.3 23-Jan-2013  yamt sync with head
 1.38.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.38.2.1 17-Apr-2012  yamt sync with head
 1.40.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.2.2 25-Feb-2013  tls resync with head
 1.40.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.47.28.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.47.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.37 01-Sep-2019  sevan Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.36 30-Jul-2013  njoly branches: 1.36.26; 1.36.28;
Add fchownat(2) specific errors.
 1.35 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.34 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.33 01-Dec-2012  wiz Remove trailing whitespace.
 1.32 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.31 31-May-2010  njoly branches: 1.31.6; 1.31.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.30 13-May-2004  wiz \- is a minus, not -.
 1.29 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.28 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.27 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.26 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.25 01-Apr-2002  jdolecek s/are are/are/
 1.24 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.23 16-Sep-2001  wiz Boring whitespace fixes.
 1.22 02-Jun-2000  hubertf branches: 1.22.4;
s/a //
 1.21 02-Dec-1999  kleink branches: 1.21.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.20 26-Sep-1999  jdolecek xref symlink(7)
 1.19 22-Mar-1999  garbled branches: 1.19.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.18 09-Dec-1998  christos Not -1, (uid_t)-1 and (gid_t)-1
 1.17 08-May-1998  kleink Add a few lines about the deviation from the POSIX and X/Open definitions,
and document the conforming interfaces.
 1.16 21-Dec-1997  kleink Update: the setuid and setgid bits will be cleared only if the caller is
not the super-user.
 1.15 11-Oct-1997  enami - Don't use capital letter for function name and argument.
- Sort SEE ALSO list.
 1.14 06-Oct-1997  enami Acutally, lchmod, lchown and lutimes may set errno to ELOOP.
 1.13 06-Oct-1997  enami Add C library interface for new system call lchmod, lchown and lutimes.
 1.12 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.11 30-Apr-1997  kleink Note that fchown(2) also implies clearing the set-{group,user}-id bits;
update standards conformance.
 1.10 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.9 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.8 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.7 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.6 29-Mar-1994  jtc Last weekend's uid_t & gid_t changes allow us to change the uid & gid
arguments to fchown() from ints to a uid_t and a gid_t.
 1.5 10-Jan-1994  jtc Fix spelling errors.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 04-Oct-1993  jtc Add #include <sys/types.h> to SYNOPSIS section, as it is needed too.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.19.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.21.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.22.4.5 21-Jun-2002  nathanw Catch up to -current.
 1.22.4.4 25-Apr-2002  nathanw Catch up to -current.
 1.22.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.22.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.22.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.31.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.12.2 25-Feb-2013  tls resync with head
 1.31.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.31.6.2 23-Jan-2013  yamt sync with head
 1.31.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.36.28.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.36.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25 30-Oct-2017  wiz Sort errors.
 1.24 25-Oct-2017  abhinav Add fchroot to the NAME section
 1.23 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.22 13-May-2004  wiz \- is a minus, not -.
 1.21 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.20 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.19 22-Jan-2003  kleink While we're here, document EPERM.
 1.18 22-Jan-2003  kleink Add a STANDARDS section; requested by Thomas Klausner.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 18-Apr-2001  kleink Document fchroot(2).
 1.12 02-Dec-1999  kleink branches: 1.12.4; 1.12.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 26-Mar-1999  sommerfe branches: 1.11.6;
Document new chroot-related restrictions on fchdir, chroot, and ptrace
made possible by the kernel getcwd infrastructure
 1.10 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.8 27-Sep-1997  hubertf s/Path/Dirname/; closes PR lib/4155
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.12.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.12.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.12.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.12.4.1 24-Apr-2001  he Pull up revision 1.13 (requested by kleink):
Document fchroot(2).
 1.2 04-Mar-2017  njoly Fix {clock,pthread}_getcpuclockid to return an error number on
failure, to match OpenGroup specifications.
 1.1 23-Apr-2016  christos branches: 1.1.2; 1.1.4;
add clock_getcpuclockid{2,}
 1.1.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.1.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6 25-Jun-2018  dholland Describe what this actually does. Bump date.
 1.5 25-Oct-2017  abhinav branches: 1.5.2;
Add clock_getcpuclockid to the NAME section
 1.4 05-Mar-2017  njoly Fix man page ERRORS section for (clock,pthread}_getcpuclockid to match
reality.
 1.3 04-Mar-2017  njoly Fix {clock,pthread}_getcpuclockid to return an error number on
failure, to match OpenGroup specifications.
 1.2 24-Apr-2016  wiz branches: 1.2.2; 1.2.4;
Fix typos, whitespace, formatting.
 1.1 23-Apr-2016  christos add clock_getcpuclockid{2,}
 1.2.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.2.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.27 27-Sep-2016  wiz Remove duplicate Pp.
 1.26 24-Sep-2016  christos move the description of CLOCK_REALTIME in the list.
 1.25 23-Apr-2016  christos branches: 1.25.2;
add clock_getcpuclockid{2,}
 1.24 09-Dec-2015  wiz Fix date.
 1.23 07-Dec-2015  pgoyette Update to match reality. For these functions, we still try the system
call first, and only fall back to /dev/clockctl if the system call
fails.
 1.22 28-Mar-2014  wiz Remove trailing whitespace. Merge EINVAL entries.
 1.21 28-Mar-2014  degroote Document a bit CLOCK_VIRTUAL and CLOCK_PROF
 1.20 11-Mar-2009  joerg branches: 1.20.6; 1.20.12;
Fix markup
 1.19 30-Apr-2008  martin branches: 1.19.8; 1.19.10;
Convert TNF licenses to new 2 clause variant
 1.18 07-Sep-2006  uebayasi branches: 1.18.16;
Correct English; help with xtraeme.
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 31-Jan-2002  wiz Whitespace nit.
 1.11 31-Jan-2002  simonb Implement the CLOCK_MONOTONIC clock for the posix/opengroup realtime
clock_() functions. This simply returns the kernel mono_time variable.
As discussed on tech-kern.
 1.10 26-Jan-2002  simonb Fix tyop, noticed by Allen Briggs.
 1.9 16-Oct-2001  wiz Boring whitespace or punctuation fixes.
 1.8 16-Sep-2001  manu Added support to use the clockctl driver if present for adjtime(),
clock_settime(), ntp_adjtime() and settimeofday(). The super-user still
always use the plain system call.
Approved by Christos
 1.7 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.6 16-Sep-2001  wiz Boring whitespace fixes.
 1.5 02-Dec-1999  kleink branches: 1.5.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.4 22-Mar-1999  garbled branches: 1.4.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.3 16-Feb-1999  kleink Dv vs. Va police.
 1.2 11-Feb-1999  kleink Oops, forgot a word.
 1.1 11-Feb-1999  kleink Document clock_settime(2) and friends.
 1.4.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.5.6.5 22-Mar-2002  nathanw Catch up to -current.
 1.5.6.4 08-Mar-2002  nathanw Catch up to -current.
 1.5.6.3 28-Jan-2002  nathanw Catch up to -current.
 1.5.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.5.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.18.16.1 18-May-2008  yamt sync with head.
 1.19.10.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.19.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.19.8.1 30-Apr-2008  martin file clock_settime.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.20.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.12 15-Oct-2011  christos close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
fopen(db, "re")
 1.11 11-Jan-2009  christos merge christos-time_t
 1.10 23-Nov-2007  uebayasi branches: 1.10.14;
KNF; no variable name in function prototype.
 1.9 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.8 07-Oct-2006  kardel branches: 1.8.8;
- simplify code
- remove any 'permission checks' via geteuid() - with upcoming
security models these might not match the model any more
- this also fixes a bug where ntp_adjtime() was denied (EPERM)
even though only a legit read status was performed
 1.7 09-Mar-2006  christos Do not use SCARG() in userland. Eliminates need for <sys/systm.h>.
 1.6 12-Jun-2005  lukem Add missing __RCSID()
 1.5 16-Jul-2003  cb Mark __clockctl_fd close-on-exec to avoid unintentionally leaking
time setting privileges across an exec.
 1.4 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.3 09-Dec-2001  manu - Changed clocktl interface to use syscallargs structures
- Implemented keep-state so that we don't have to open /dev/clockctl each time.
 1.2 17-Sep-2001  thorpej branches: 1.2.2;
Pull in <string.h> for memcpy() prototype.
 1.1 16-Sep-2001  manu Added support to use the clockctl driver if present for adjtime(),
clock_settime(), ntp_adjtime() and settimeofday(). The super-user still
always use the plain system call.
Approved by Christos
 1.2.2.3 28-Jan-2002  nathanw Catch up to -current.
 1.2.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.2.2.1 17-Sep-2001  nathanw file clock_settime.c was added on branch nathanw_sa on 2001-10-08 20:21:38 +0000
 1.8.8.1 09-Jan-2008  matt sync with HEAD
 1.10.14.1 08-Nov-2008  christos time_t changes
 1.15 01-Aug-2022  wiz clone(2): document that _GNU_SOURCE must be defined for the prototypes
 1.14 12-May-2020  kamil Remove mentions of CLONE_PID and CLONE_STOPPED

CLONE_PID was removed in Linux 2.5.15 and recycled for
CLONE_PIDFD since Linux 5.2.

CLONE_STOPPED was removed in Linux 2.6.38 and recycled
for CLONE_NEWCGROUP since Linux 4.6.
 1.13 29-Jan-2012  wiz branches: 1.13.42;
Add Nm for __clone, man page is already linked to that name.
Noted by Abhinav Upadhyay.
 1.12 04-May-2010  jruoho branches: 1.12.6;
Update the -- now quite big -- list of unsupported Linux options.
 1.11 30-Apr-2008  martin branches: 1.11.8;
Convert TNF licenses to new 2 clause variant
 1.10 16-Apr-2003  wiz branches: 1.10.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 31-Mar-2003  perry semanics->semantics (Igor Sobrado, PR misc/19731)
 1.8 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.6 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 16-Sep-2001  wiz branches: 1.5.2;
Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.4 16-Sep-2001  wiz Boring whitespace fixes.
 1.3 18-Jul-2001  thorpej Fix the declaration of the funciton in the SYNOPSIS section.
 1.2 17-Jul-2001  thorpej Document CLONE_VFORK and note that we also do not implement CLONE_PTRACE.
 1.1 17-Jul-2001  thorpej Manual page for clone(2).
 1.5.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.5.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.5.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.5.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.5.2.1 16-Sep-2001  nathanw file clone.2 was added on branch nathanw_sa on 2001-10-08 20:21:38 +0000
 1.10.30.1 18-May-2008  yamt sync with head.
 1.11.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.11.8.1 30-Apr-2008  martin file clone.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.12.6.1 17-Apr-2012  yamt sync with head
 1.13.42.1 03-Aug-2022  martin Pull up following revision(s) (requested by wiz in ticket #1484):

lib/libc/sys/clone.2: revision 1.14
lib/libc/sys/clone.2: revision 1.15
include/sched.h: revision 1.13
include/sched.h: revision 1.14
include/sched.h: revision 1.15

Remove mentions of CLONE_PID and CLONE_STOPPED

CLONE_PID was removed in Linux 2.5.15 and recycled for
CLONE_PIDFD since Linux 5.2.
CLONE_STOPPED was removed in Linux 2.6.38 and recycled
for CLONE_NEWCGROUP since Linux 4.6.

sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.
Ok martin@

clone(2): document that _GNU_SOURCE must be defined for the prototypes
sched.h: format comment to follow KNF
requested by thorpej@
sched.h: keep __clone() visible under _NETBSD_SOURCE
 1.19 21-Dec-2024  riastradh close(2): Document the finality of closing.

Even if close(2) returns -1 on error, the descriptor is closed (or
was already closed).

POSIX doesn't specify this, but that's a bug in POSIX (probably to
accommodate some buggy ancient proprietary Unix). Every free
software OS kernel I checked works the same way and it is important
to be able to reliably close descriptors with finality.
 1.18 01-Sep-2019  sevan branches: 1.18.10;
Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.17 01-Jun-2004  kleink branches: 1.17.92; 1.17.94;
Don't refer to errno as "global integer variable".
 1.16 13-May-2004  wiz \- is a minus, not -.
 1.15 07-Aug-2003  agc branches: 1.15.2;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 28-Apr-1998  fair fix mdoc references
 1.6 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 10-Jan-1994  jtc Fix spelling errors.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.15.2.1 01-Jun-2004  jmc Pullup patch (requested by kleink in ticket #432)

Dont refer to errno as "global integer variable".
 1.17.94.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.17.92.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.18.10.1 02-Aug-2025  perseant Sync with HEAD
 1.29 28-Mar-2021  dholland Document EINVAL for out of range socket address lengths.

This is what happens, but wasn't documented. Applies to bind(2),
connect(2), and send(2).
 1.28 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.27 18-May-2004  wiz Bump date for previous.
 1.26 18-May-2004  ragge Update connect manpage to reflect current changes.
 1.25 13-May-2004  wiz \- is a minus, not -.
 1.24 07-Aug-2003  agc branches: 1.24.2;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.23 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.22 18-Mar-2003  wiz Mention namelen in DESCRIPTION. From Todd C. Miller/OpenBSD.
 1.21 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.20 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.19 16-Oct-2001  kleink Remove inclusion of <sys/types.h> from synopsis; it is no longer needed.
 1.18 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.17 17-Jun-2000  hubertf branches: 1.17.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.16 17-May-2000  fair branches: 1.16.2;
A little nroff clean up, since I was here to deal with PR 9727,
but someone beat me to it, and didn't log that...
 1.15 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.14 18-Aug-1999  sommerfeld branches: 1.14.4;
Fix PR8208, this time to the correct location..
 1.13 22-Mar-1999  garbled branches: 1.13.2;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 10-Feb-1999  kleink Reflect the addition of socklen_t.
 1.11 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.10 28-Jul-1998  is Mention poll(2), too, where we formerly only mentioned select(2).
 1.9 28-Apr-1998  fair Change occurrences of "UNIX" to .Ux or .At as appropriate.
 1.8 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.2.1 22-Aug-1999  he Pull up 1.14: Explain how to get status information for non-blocking
connects, fixing PR8208. From sommerfeld.
 1.14.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.17.4.4 22-Mar-2002  nathanw Catch up to -current.
 1.17.4.3 08-Mar-2002  nathanw Catch up to -current.
 1.17.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.17.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.24.2.1 20-May-2004  tron Pull up revision 1.26 (requested by ragge in ticket #354):
Update connect manpage to reflect current changes.
 1.37 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.36 01-Nov-2024  nia libc: Expose pipe2 and dup3 to POSIX.2024 applications
 1.35 06-Jul-2024  rin dup(2): Trailing whitespace
 1.34 19-May-2024  christos branches: 1.34.2;
Amend for oldfd == newfd returning EINVAL in dup3
 1.33 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.32 21-Feb-2017  abhinav Use .Fn to refer functions instead of .Nm.
 1.31 21-Feb-2017  abhinav Fix spelling of "includes".
 1.30 25-Dec-2013  wiz branches: 1.30.8; 1.30.12;
Sort errors. Use parentheses instead of Pq in normal text.
 1.29 24-Dec-2013  dholland Rewrite for clarity and add an example.
 1.28 25-Jan-2012  christos branches: 1.28.6;
As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
 1.27 22-Jul-2011  wiz branches: 1.27.2;
Consistently mark up defined values with Dv.
 1.26 16-Jul-2011  jruoho Note that dup2(2) and dup3(2) may not fail with EMFILE; from PR lib/45148.
 1.25 15-Jul-2011  christos mention EINVAL.
 1.24 15-Jul-2011  jruoho Small markup glitch.
 1.23 27-Jun-2011  wiz Various minor improvements.
 1.22 26-Jun-2011  christos * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.21 11-Jan-2009  christos merge christos-time_t
 1.20 02-Dec-2008  christos correct EBADF bogus comment.
 1.19 09-Feb-2008  dholland branches: 1.19.12;
Document the behavior of dup2 when oldfd == newfd: nothing happens.
Suggested by the patches in PR bin/36551 from Greg A. Woods.
 1.18 13-May-2004  wiz branches: 1.18.16;
\- is a minus, not -.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.6 06-Jun-1997  mikel getdtablesize(2) -> getdtablesize(3)
 1.5 16-May-1997  kleink Update standards conformance.
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.18.16.1 23-Mar-2008  matt sync with HEAD
 1.19.12.1 04-Jan-2009  christos merge with head.
 1.27.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.2.1 17-Apr-2012  yamt sync with head
 1.28.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.30.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.30.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.34.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 28-Jul-2023  wiz Fix some macro( usage)s
 1.1 28-Jul-2023  christos Add epoll(2) from Theodore Preduta as part of GSoC 2023
 1.1 28-Jul-2023  christos Add epoll(2) from Theodore Preduta as part of GSoC 2023
 1.2 23-Sep-2021  uwe Markup fixes.
 1.1 19-Sep-2021  thorpej Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.
 1.1 19-Sep-2021  thorpej Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.
 1.1 19-Sep-2021  thorpej Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.
 1.48 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.47 28-Apr-2024  uwe branches: 1.47.2;
execve(2): brush up markup
 1.46 28-Apr-2024  rillig execve.2: fix typo in markup
 1.45 18-Sep-2019  wiz Sort errors; remove two more duplicates.
 1.44 16-Sep-2019  christos merge the two E2BIG entries (wiz)
 1.43 16-Sep-2019  wiz Add missing word, add comma in enumeration.
 1.42 15-Sep-2019  christos documentation for fexecve(2)
 1.41 14-May-2017  wiz branches: 1.41.10;
file system police.
 1.40 31-May-2010  njoly branches: 1.40.36;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.39 18-May-2009  wiz Sort errors.
 1.38 23-Mar-2009  joerg Remove/convert physical markup.
 1.37 24-Feb-2008  christos branches: 1.37.12;
doecument that we now can return eagain.
 1.36 02-Dec-2007  rillig branches: 1.36.4;
ENOENT is also returned when the script interpreter does not exist.
 1.35 07-May-2005  perry branches: 1.35.10;
Change HISTORY. It traces execve only back to 4.2BSD, and it is a
touch older than that. (Surprisingly, though, it doesn't appear to
have been in v6.)
 1.34 07-May-2005  perry cross reference script(7)
 1.33 13-May-2004  wiz \- is a minus, not -.
 1.32 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.31 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.30 15-Mar-2003  wiz Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
 1.29 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.28 01-Oct-2002  wiz New sentence, new line.
 1.27 01-Oct-2002  wiz Remove some \f* cruft.
 1.26 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.25 26-Sep-2002  christos Revise wording to say that setting the argument vector is not mandatory.

>xs@kittenz.org:
>susv3 agrees with this, since in the rationale, susv3 states the
>requirement of argc >= 1 was removed recently following iso c. it
>is now only a "should."
 1.24 11-Aug-2002  yamt bump .Dd .
 1.23 11-Aug-2002  yamt document a hack about setuid programs and fd 0, 1 and 2.
from OpenBSD.
 1.22 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.21 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.20 16-Sep-2001  wiz Boring whitespace fixes.
 1.19 05-Jul-2000  he branches: 1.19.2;
Add text that says that an interpreter cannot itself be an interpreter
file. Inspired by Solaris manpage and the current NetBSD implementation
as observed with the scotty package and attempts to use the earlier shell
wrapper as an interpreter.
 1.18 17-Jun-2000  hubertf Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.17 08-May-2000  soda branches: 1.17.2;
ARG_MAX is bumped from 20KB to 256KB since Jan 16 1994 (revision 1.7 of <sys/syslimits.h>). i.e. before NetBSD-1.0 release.
pointed out by NAKAJIMA Yoshihiro and Tanaka Akira on fj.os.bsd.netbsd newsgroup.
 1.16 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.15 22-Mar-1999  garbled branches: 1.15.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.14 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.13 02-Feb-1998  perry merge lite-2
 1.12 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.11 10-Jul-1997  mikel xref _exit(2) or exit(3) instead of exit(2)
 1.10 12-May-1997  mikel xref sigprocmask(2), not obsolete sigsetmask(2).
 1.9 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.8 17-Oct-1994  cgd either change or update references to sigvec(), as appropriate
 1.7 22-Apr-1994  jtc branches: 1.7.2;
Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.6 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.5 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 26-Oct-1993  cgd fixes from Garrett A. Wollman <wollman@emba.uvm.edu>:
note that EACCES is returned if program file is on an FS mounted
MNT_NOEXEC. also fix missing close-paren.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.2.1 17-Oct-1994  cgd from trunk.
 1.15.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.19.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.19.2.4 13-Aug-2002  nathanw Catch up to -current.
 1.19.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.19.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.19.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.35.10.2 23-Mar-2008  matt sync with HEAD
 1.35.10.1 09-Jan-2008  matt sync with HEAD
 1.36.4.1 24-Mar-2008  keiichi sync with head.
 1.37.12.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.40.36.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.41.10.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.47.2.1 02-Aug-2025  perseant Sync with HEAD
 1.6 11-Nov-2014  njoly Do not hardcode values for ENAMETOOLONG, use symblic constants.
 1.5 03-Aug-2011  wiz Bump date for previous. Remove trailing whitespace.
Sort error descriptions.
 1.4 03-Aug-2011  manu Make cp -p and mv preverve extended attributes, and complain if they cannot.

Also introduce library functions for copying extended attributes from one
file to another:
- extattr_copy_file, extattr_copy_fd, extattr_copy_link, with FreeBSD style,
where a namespace is to be supplied
- cpxattr, fcpxattr, lcpxattr, with Linux style, where all namespaces
accessible to the caller are copied, and the others are silently ignored.
 1.3 02-Jan-2005  wiz branches: 1.3.32;
Sort sections and SEE ALSO. Remove superfluous comma.
 1.2 02-Jan-2005  thorpej Remove VOP_*() references.
 1.1 02-Jan-2005  thorpej System calls and support routines for file system extended attributes. Libc
version is bumped to 12.125.

From FreeBSD.
 1.3.32.1 17-Jul-2011  riz Pull up following revision(s) (requested by manu in ticket #1645):
lib/libc/sys/Makefile.inc 1.207 via patch
lib/libc/sys/extattr_get_file.2 patch
lib/libpuffs/dispatcher.c 1.34,1.36 via patch
lib/libpuffs/puffs.c 1.107 via patch
lib/libpuffs/puffs.h 1.115,1.118 via patch
sys/fs/puffs/puffs_msgif.h 1.71,1.76 via patch
sys/fs/puffs/puffs_vfsops.c 1.88 via patch
sys/fs/puffs/puffs_vnops.c 1.145,1.154 via patch
sys/kern/vfs_xattr.c 1.24-1.27 via patch
sys/kern/vnode_if.c 1.87 via patch
sys/sys/Makefile 1.133 via patch
sys/sys/extattr.h 1.6 via patch
sys/sys/vnode_if.h 1.81 via patch
sys/ufs/ffs/ffs_vnops.c patch
sys/ufs/ufs/ufs_extattr.c 1.31,1.34 via patch

* support extended attributes
* bump major due to structure growth
* add some spare space
* remove ABI sillyness
Support extended attributes.
Fix multiple non compliances in our Linux-like extattr API, and make it
public so that it can be used.
Improve a bit listxattr(2). It attemps to list both system and user
extended attributes, and it faled if calling user did not have privilege
for reading system EA. Now we just lise user EA and skip system EA in
reading them is not allowed.
Fix bug introduced in previous commuit: Do not vrele() a vnode we did not
obtained.
Improve UFS1 extended attributes usability
- autocreate attribute backing file for new attributes
- autoload attributes when issuing extattrctl start
- when autoloading attributes, do not display garbage warning when looking
up entries that got ENOENT
Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.
There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
extattr_list_file(2), which is obtanined by setting the
EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)
This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.
 1.7 11-Mar-2025  wiz branches: 1.7.4;
Sort errors.
 1.6 11-Mar-2025  riastradh extattrctl(2): Fix various errors in the man page.

1. Fix order of arguments in prototype.
2. Fix order of arguments in example.
3. Fix error code for EOPNOTSUPP.
4. Fix version of NetBSD in which this appeared.
 1.5 11-Mar-2025  wiz 'file system' police; use .Rv; add some missing words
 1.4 10-Mar-2025  christos Correct errors in previous and explain the UFS1 extended attribute
implementation.
 1.3 09-Mar-2025  wiz extattrctl(2): fix some lint
 1.2 09-Mar-2025  christos improve wording, sort Xr's
 1.1 09-Mar-2025  christos PR/59160: Taylor R Campbell: extattrctl(2): missing man page
 1.7.4.2 02-Aug-2025  perseant Sync with HEAD
 1.7.4.1 11-Mar-2025  perseant file extattrctl.2 was added on branch perseant-exfatfs on 2025-08-02 05:54:43 +0000
 1.51 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.50 10-Jul-2023  christos branches: 1.50.2;
Add memfd_create(2) from GSoC 2023 by Theodore Preduta
 1.49 04-Dec-2022  uwe fcntl(2): Fix wrong markup in a couple of places
 1.48 04-Dec-2022  uwe lib: Mark up error names in man pages with .Er
 1.47 28-Jul-2021  wiz Fix typos, improve wording.
 1.46 27-Jul-2021  manu Tie the maximum file lock per unprivilegied uid to kern.maxfiles

This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
 1.45 27-Sep-2019  wiz Sort errors. Remove trailing whitespace.
 1.44 26-Sep-2019  christos document errors returned by F_GETPATH
 1.43 16-Sep-2019  wiz Add missing word, fix typo, remove trailing whitespace.
 1.42 15-Sep-2019  christos Add F_GETPATH, presented to tech-kern.
 1.41 28-Dec-2013  dholland branches: 1.41.26; 1.41.28;
O_SYNC, not O_FSYNC. Spotted by "beatnix" on freenode.
 1.40 25-Jan-2012  christos branches: 1.40.6;
As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
 1.39 27-Jun-2011  wiz branches: 1.39.2;
Various minor improvements.
 1.38 26-Jun-2011  christos * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.37 17-May-2010  jruoho Add subtitle. Break long paragraph.
 1.36 03-Jun-2009  wiz Bump date for previous.
 1.35 01-Jun-2009  njoly Note that fcntl(2) returns EINVAL for invalid command.
 1.34 04-Jan-2007  wiz Re-add removed block:
Christian Biere suggests it was a typo, and was intended to describe
ENFILE; let it do that.
 1.33 03-Jan-2007  wiz Remove duplicate EMFILE description.
 1.32 03-Jan-2007  cbiere Fixed wrong and illogical statement:
fcntl() F_DUPFD does NOT set FD_CLOEXEC for the new file descriptor.
 1.31 13-May-2004  wiz \- is a minus, not -.
 1.30 05-Jan-2004  christos Document F_MAXFD, F_CLOSEM
 1.29 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.28 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.27 02-Mar-2003  jmmv Add missing .Pp
 1.26 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.25 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.24 24-Sep-2002  wiz Better mdoc.
 1.23 17-Sep-2002  christos document FD_CLOEXEC from FreeBSD.
 1.22 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.21 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.20 16-Sep-2001  wiz Boring whitespace fixes.
 1.19 05-May-2001  kleink Document l_type usage explicitly; fixes PR misc/10325.
 1.18 02-Dec-1999  kleink branches: 1.18.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.17 24-May-1999  ross branches: 1.17.4;
See the incredible, morphing, fcntl(2) parameter #3 change again!
This time, it actually matches the prototype and the 1003.1 definition.
 1.16 25-Mar-1999  perry fix to note that arg is void * but is used by some commands as an int
 1.15 24-Mar-1999  mycroft Remove spurious .ne's.
 1.14 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.13 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.12 28-Apr-1998  fair fix mdoc references
 1.11 06-Nov-1997  fair correct documentation: lock contention returns EAGAIN, not EACCES, per PR#4369 and UTSL.
 1.10 19-Aug-1997  mikel branches: 1.10.2;
fix typo; from <entropy@tardis.bernstein.com> in PR lib/4006
 1.9 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.8 10-Jul-1997  mikel xref execve(2), getdtablesize(3) instead of execv(2), getdtablesize(2)
 1.7 16-May-1997  kleink Note 1003.1 conformance.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 17-Oct-1994  cgd either change or update references to sigvec(), as appropriate
 1.4 15-Dec-1993  jtc branches: 1.4.2;
Tell user to #include <fcntl.h>, not <sys/fcntl.h> or <sys/file.h>.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 17-Oct-1994  cgd from trunk.
 1.10.2.1 06-Nov-1997  mellon Pull rev 1.11 up from trunk (fair)
 1.17.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.18.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.18.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.18.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.39.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.39.2.1 17-Apr-2012  yamt sync with head
 1.40.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.41.28.1 07-Sep-2021  martin Pull up following revision(s) (requested by manu in ticket #1343):

share/man/man7/sysctl.7: revision 1.153
sys/kern/vfs_lockf.c: revision 1.74
lib/libc/sys/fcntl.2: revision 1.46
lib/libc/sys/flock.2: revision 1.23

Tie the maximum file lock per unprivilegied uid to kern.maxfiles

This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
 1.41.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.50.2.1 02-Aug-2025  perseant Sync with HEAD
 1.17 25-Mar-2020  gdt Relax fdatasync restriction that fd be writable

The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX. Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users. Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.
 1.16 30-Apr-2008  martin branches: 1.16.8; 1.16.56; 1.16.64; 1.16.66;
Convert TNF licenses to new 2 clause variant
 1.15 13-May-2004  wiz branches: 1.15.24;
\- is a minus, not -.
 1.14 25-Oct-2003  kleink POSIX: when attempting to fdatasync(2) a file which is not open for
writing, fail with EBADF.
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.11 02-Oct-2002  wiz Correct various misspellings.
 1.10 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.9 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.7 16-Sep-2001  wiz Boring whitespace fixes.
 1.6 02-Dec-1999  kleink branches: 1.6.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.5 22-Mar-1999  garbled branches: 1.5.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.4 16-Feb-1999  kleink Dv vs. Va police.
 1.3 06-Jun-1998  scottr Fix a tyop.
 1.2 06-Jun-1998  kleink Rework this file, as based on suggestions made by Chris Demetriou.
 1.1 05-Jun-1998  kleink Manual page for fdatasync(2).
 1.5.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.6.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.6.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.6.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.15.24.1 18-May-2008  yamt sync with head.
 1.16.66.1 22-Apr-2020  martin Pull up following revision(s) (requested by gdt in ticket #840):

sys/kern/vfs_syscalls.c: revision 1.544
lib/libc/sys/fdatasync.2: revision 1.17

Relax fdatasync restriction that fd be writable

The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX. Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users. Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.
 1.16.64.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.16.56.1 22-Apr-2020  martin Pull up following revision(s) (requested by gdt in ticket #1534):

sys/kern/vfs_syscalls.c: revision 1.544
lib/libc/sys/fdatasync.2: revision 1.17

Relax fdatasync restriction that fd be writable

The restriction that a fd passed to fdatasync(2) must be writable was
added in 2003 in order to comply with POSIX. Since then, POSIX has
removed that requirement, and POSIX-valid programs have been therefore
encountering errors on NetBSD.

Patch by Paul Ripke after discussion on netbsd-users. Issue
discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.
 1.16.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.16.8.1 30-Apr-2008  martin file fdatasync.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.5 30-Jun-2016  wiz Bump date for header file change.
 1.4 30-Jun-2016  dholland PR 51287 Ralf Nolden: posix_fallocate belongs in <fcntl.h>
 1.3 01-Feb-2015  christos PR/49617: Kirk Russell: Describe the posix_fallocate return values correctly.
 1.2 25-Jul-2014  wiz branches: 1.2.2; 1.2.4; 1.2.6;
Sort errors. Whitespace nits.
 1.1 25-Jul-2014  dholland Add userlevel manifestations of posix_fallocate and fdiscard, in
unistd.h and libc, and add a man page.

Allow wiggle room in the man page for implementations of fallocate
that either (a) don't fully unwind on failure, leaving new blocks
allocated without changing the file size, or (b) create only in-memory
transient reservations that disappear when crashing or rebooting.

Also, add crossreference to fdiscard from ftruncate(2), and remove the
old BUGS entry from there that called for a generalized version that
allows discarding ranges of a file: that's what fdiscard is.
 1.2.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 25-Jul-2014  tls file fdiscard.2 was added on branch tls-maxphys on 2014-08-20 00:02:16 +0000
 1.2.4.1 08-Feb-2015  snj Pull up following revision(s) (requested by christos in ticket #472):
lib/libc/include/namespace.h: revision 1.175
lib/libc/sys/Makefile.inc: revision 1.225, 1.227
lib/libc/sys/fdiscard.2: revision 1.3
lib/libc/sys/fdiscard.c: revision 1.1
lib/libc/sys/posix_fallocate.c: revision 1.1
Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
--
PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno, so make it PSEUDO_NOERROR, by adding a new
category GLUENOERR.
--
PR/49617: Kirk Russell: Describe the posix_fallocate return values correctly.
 1.2.2.2 10-Aug-2014  tls Rebase.
 1.2.2.1 25-Jul-2014  tls file fdiscard.2 was added on branch tls-earlyentropy on 2014-08-10 06:51:51 +0000
 1.1 25-Sep-2014  manu branches: 1.1.2;
Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
 1.1.2.2 08-Feb-2015  snj Pull up following revision(s) (requested by christos in ticket #472):
lib/libc/include/namespace.h: revision 1.175
lib/libc/sys/Makefile.inc: revision 1.225, 1.227
lib/libc/sys/fdiscard.2: revision 1.3
lib/libc/sys/fdiscard.c: revision 1.1
lib/libc/sys/posix_fallocate.c: revision 1.1
Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
--
PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno, so make it PSEUDO_NOERROR, by adding a new
category GLUENOERR.
--
PR/49617: Kirk Russell: Describe the posix_fallocate return values correctly.
 1.1.2.1 25-Sep-2014  snj file fdiscard.c was added on branch netbsd-7 on 2015-02-08 22:05:55 +0000
 1.18 25-Oct-2017  abhinav Add fhstatvfs1 to the NAME section
 1.17 05-Aug-2009  wiz Bump date for previous.
 1.16 05-Aug-2009  pooka fhopen() needs sys/mount.h
(if someone disagrees, feel free to fix as much as your heart desires)
 1.15 03-Aug-2006  wiz Drop trailing whitespace.
 1.14 31-Jul-2006  martin Make filehandles opaque to userland
 1.13 19-May-2006  tsutsui fhstatvfs(2) isn't in NetBSD 2.1 but 3.0.
 1.12 13-May-2004  wiz \- is a minus, not -.
 1.11 21-Apr-2004  wiz Drop trailing whitespace.
 1.10 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 02-Oct-2002  wiz Correct various misspellings.
 1.6 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.5 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.3 13-Mar-2000  soren branches: 1.3.6;
Fix doubled 'the's.
 1.2 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.1 30-Jun-1999  wrstuden branches: 1.1.4;
Give fhopen, fhstat, and fhstatfs a man page.
 1.1.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.3.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.3.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.3.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.25 04-Dec-2022  uwe flock(2): s/Eq/Er/ typo in the ERRORS section
 1.24 28-Jul-2021  wiz Fix typos, improve wording.
 1.23 27-Jul-2021  manu Tie the maximum file lock per unprivilegied uid to kern.maxfiles

This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
 1.22 15-Oct-2011  rmind branches: 1.22.44;
Mention POSIX conformance of some functions, when they appeared, sprinkle .Xr.
 1.21 29-Oct-2009  wiz Sort ERRORS. Add comma in enumeration.
 1.20 28-Oct-2009  njoly Make flock(2) more robust to invalid operation, such as
(LOCK_EX|LOCK_SH).
 1.19 13-May-2004  wiz \- is a minus, not -.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.14 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.13 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 19-May-2001  jdolecek Use EAGAIN instead of EWOULDBLOCK. The actual numeric value is
same, but EAGAIN is the posixly correct name.
Addresses misc/12960.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 10-May-1998  kleink SYNOPSIS referred to the wrong header file.
 1.6 17-Jul-1997  phil Try to make man page refelect reality. EINVAL for "operation" argument,
EOPNOTSUPP for an fd not talking about a v-node (file in man page).
Closes PR2602.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.44.1 07-Sep-2021  martin Pull up following revision(s) (requested by manu in ticket #1343):

share/man/man7/sysctl.7: revision 1.153
sys/kern/vfs_lockf.c: revision 1.74
lib/libc/sys/fcntl.2: revision 1.46
lib/libc/sys/flock.2: revision 1.23

Tie the maximum file lock per unprivilegied uid to kern.maxfiles

This makes the limit simple to raise at run time. While there, document
that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
 1.27 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.26 24-Mar-2022  gutteridge branches: 1.26.4;
fork.2: add _exit(2) xref and spell "ID" consistently
 1.25 01-Sep-2019  sevan fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.24 12-Jul-2016  wiz branches: 1.24.16; 1.24.18;
Merge two EAGAIN sections.
 1.23 09-Jul-2016  dholland Drop in a reference to the list of async-signal-safe functions.
 1.22 25-Jun-2004  wiz Do not xref ourselves; grammar fixes.
 1.21 10-Jun-2004  lha Expand a little bit on forks behavior in threaded programs
OK by nathanw and martin
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 15-Mar-2003  jhawk Xr vfork(2); not worth a Dd bump
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 11-Aug-2002  yamt note that child should use _exit instead of exit.
from OpenBSD.
 1.14 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 02-Dec-1999  kleink branches: 1.12.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 28-Apr-1998  fair fix mdoc references
 1.8 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.7 11-Mar-1997  mikel per-user process limit is set by RLIMIT_NPROC, not MAXUPRC; fixes PR 888.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 04-Oct-1993  jtc Changed SYNOPSIS to #include <sys/types.h> before <unistd.h>, as it should
(must, in a strictly conforming implementation) to define pid_t.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.4 13-Aug-2002  nathanw Catch up to -current.
 1.12.6.3 21-Jun-2002  nathanw Catch up to -current.
 1.12.6.2 22-Mar-2002  nathanw Catch up to -current.
 1.12.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.24.18.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.24.16.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.26.4.1 02-Aug-2025  perseant Sync with HEAD
 1.21 17-Feb-2021  wiz Merge EINVAL descriptions; replace Xr to itself with Nm.
 1.20 17-Feb-2021  dholland Document more EINVAL cases for fsync_range.

Corresponds to previous code fix.
 1.19 13-Feb-2021  dholland Document EINVAL for invalid flags given to fsync_range().
 1.18 22-Sep-2013  apb Attempt to clarify that fsync() is like fsync_range() with the
FFILESYNC flag but not the FDISKSYNC flag.

Add a paragraph of weasel words about how writing to a permanent
storage device does not necessarily write to permanent storage media
within that device.

Move the description of FDISKSYNC into the same list as FDATASYNC
and FFILESYNC.

Change the order of paragraphs or sentences in an attempt to
improve the flow.
 1.17 17-May-2010  jruoho branches: 1.17.6; 1.17.12;
Offset indent, .Dv.
 1.16 25-Jan-2005  wrstuden Extend fsync_range(2) to support the FDISKSYNC flag, which requests
that the sync be propogated out through the disk drive caches.
 1.15 18-Nov-2003  wiz Fix typo in previous.
 1.14 18-Nov-2003  thorpej Userland portion of fsync_range(2), written by Bill Studenmund, and
contributed by Wasabi Systems, Inc.
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.12 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.11 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.10 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.9 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 06-Oct-2000  jdolecek branches: 1.8.2;
kill references to update(8), it doesn't exist any more
this addresses bin/11141 by Nick Hudson
 1.7 02-Dec-1999  kleink branches: 1.7.4;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.6 22-Mar-1999  garbled branches: 1.6.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.4.1 07-Oct-2000  jdolecek pullup rev. 1.8 from trunk (approved by thorpej):
remove reference to update(8), it no longer exists
 1.8.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.8.2.2 22-Mar-2002  nathanw Catch up to -current.
 1.8.2.1 08-Mar-2002  nathanw Catch up to -current.
 1.17.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.13 23-Nov-2007  uebayasi branches: 1.13.30;
KNF; no variable name in function prototype.
 1.12 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.11 07-Aug-2003  agc branches: 1.11.22;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.10 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.9 15-Nov-1998  christos delint
 1.8 14-Oct-1998  kleink Need internal names for ftruncate(), lseek(), mmap(), pread() and pwrite().
 1.7 13-Jul-1997  christos Fix RCSID's
 1.6 23-Dec-1996  cgd Fix quad_t __syscall() return goofs. Now these should work on big-endian
systems, too.
 1.5 22-Dec-1996  cgd explicitly cast __syscall() returns to (int) so that lint knows
that we know what we're doing.
 1.4 20-Dec-1996  cgd pull in unistd.h for prototypes
 1.3 27-Feb-1995  cgd clean up merge, fix Id's
 1.2 06-May-1994  cgd branches: 1.2.4;
clean
 1.1 02-Apr-1994  cgd branches: 1.1.1;
stubs, to get the padding right. so nasty it's almost unbelievable.
also, kill "special lseek" bogon.
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.2.4.1 18-Apr-1995  jtc #include "namespace.h"
 1.11.22.1 09-Jan-2008  matt sync with HEAD
 1.13.30.1 17-Apr-2012  yamt sync with head
 1.7 29-Apr-2010  jruoho Properly mark the standard that "deprecated" all of these.
 1.6 28-Apr-2010  jruoho Note that the ucontext(2) et. al. were first moved from X/OPEN extensions to
the base POSIX-2001 and later marked as obsolete in POSIX-2008.
 1.5 30-Apr-2008  martin branches: 1.5.8;
Convert TNF licenses to new 2 clause variant
 1.4 16-Apr-2003  wiz branches: 1.4.30;
Use .In instead of .Fd.
 1.3 19-Jan-2003  wiz Fix typo.
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 05-Mar-2001  nathanw branches: 1.1.2;
file getcontext.2 was initially added on branch nathanw_sa.
 1.1.2.2 17-Jan-2003  wiz Fix an xref, sort SEE ALSO, add missing word.
 1.1.2.1 05-Mar-2001  nathanw User-level support for LWPs and scheduler activations.
SVR4-style ucontext code by Klaus Klein.
 1.4.30.1 18-May-2008  yamt sync with head.
 1.5.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5.8.1 30-Apr-2008  martin file getcontext.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.25 14-May-2017  wiz file system police.
 1.24 23-Jan-2016  dholland branches: 1.24.6;
MAXNAMLEN, not MAXNAMELEN. From Giuseppe Gatta on netbsd-docs.
 1.23 20-Jul-2011  njoly Remove unneeded `Either' word in EFAULT error description.
 1.22 04-Jun-2010  jruoho Fix .Xr; dirent(5) -> dirent(3).
 1.21 15-May-2010  jruoho Move the more detailed discussion around the dirent-structure from
getdents(2) to dirent(5), and extend it with some compatibility notes.
 1.20 14-Apr-2010  wiz Sort ERRORS.
 1.19 14-Apr-2010  jruoho Use a list and sort it by the entries in the structure.
 1.18 26-Dec-2005  perry u_intN_t -> uintN_t
 1.17 05-Sep-2005  yamt d_namlen is now 16-bit.
 1.16 19-Aug-2005  christos 64 bit inode changes
 1.15 13-May-2004  wiz \- is a minus, not -.
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.11 12-Aug-2002  wiz Remove duplicate lines.
 1.10 12-Aug-2002  soren Catch up to struct dirent.
 1.9 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.7 16-Mar-2001  fair Correct typo in ERRORS, and document that getdents(2) can return
directory entries that refer to deleted files, all per PR 10567.
 1.6 21-Nov-2000  wiz branches: 1.6.2;
fix typo
 1.5 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.4 17-Apr-1999  kleink branches: 1.4.4;
Fix incorrect reference in ERRORS section; from Paul Wain in PR misc/7405.
 1.3 29-Aug-1998  lukem branches: 1.3.2;
first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.2 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.1 10-Oct-1997  fvdl Add new getdents() syscall, provide compat code for old getdirentries.
 1.3.2.1 17-Apr-1999  kleink Pull up rev. 1.4; approved by cjs.
 1.4.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.4 13-Aug-2002  nathanw Catch up to -current.
 1.6.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.6.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.6.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.24.6.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.2 13-Sep-2005  christos compat core reorg.
 1.1 19-Aug-2005  christos 64 bit inode changes
 1.9 20-Oct-1997  christos Bring back swapon and getdirentries from libcompat.
 1.8 10-Oct-1997  fvdl Add new getdents() syscall, provide compat code for old getdirentries.
 1.7 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.4 29-Nov-1993  jtc Format ERROR values like all the other manual pages.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.16 13-Sep-2005  christos compat core reorg.
 1.15 13-May-2004  wiz \- is a minus, not -.
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.11 08-Oct-2002  itojun backout previous (3rd arg type), as it does not meet with getdirentries.c.
(which standard dictates the function prototype?)
 1.10 03-Oct-2002  jdolecek COMPAT_43 getdirentries(2) actually has u_int 'nbytes' argument
 1.9 12-Aug-2002  soren Sort struct members.
 1.8 12-Aug-2002  soren Take formatting fixes and note about deleted files from getdents.2.
 1.7 07-Feb-2002  ross Generate <>& symbolically.
 1.6 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.5 16-Sep-2001  wiz Boring whitespace fixes.
 1.4 09-Apr-1999  kleink branches: 1.4.10;
Remove duplicate section header; from NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
in PR lib/7320.
 1.3 29-Aug-1998  lukem branches: 1.3.2;
first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.2 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.1 20-Oct-1997  christos branches: 1.1.1;
Bring back swapon and getdirentries from libcompat.
 1.1.1.1 02-Feb-1998  perry import lite-2
 1.3.2.1 09-Apr-1999  kleink Pull up rev. 1.4; approved by perry.
 1.4.10.4 13-Aug-2002  nathanw Catch up to -current.
 1.4.10.3 22-Mar-2002  nathanw Catch up to -current.
 1.4.10.2 08-Mar-2002  nathanw Catch up to -current.
 1.4.10.1 08-Oct-2001  nathanw Catch up to -current.
 1.6 13-Sep-2005  christos compat core reorg.
 1.5 19-Aug-2005  christos 64 bit inode changes
 1.4 12-Jun-2005  lukem Add missing __RCSID()
 1.3 15-Nov-1998  christos delint
 1.2 14-Oct-1998  kleink Need "namespace.h".
 1.1 10-Oct-1997  fvdl Add new getdents() syscall, provide compat code for old getdirentries.
 1.4 07-May-1994  mycroft Clean up deleted files.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 02-Apr-1993  deraadt added: the entire domainanme set. domainmame(1), domainname(2), and a spiffy
man page.
 1.4 14-Jun-1994  mycroft Clean up deleted files.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.21 30-Oct-2006  mjf Add references to other filehandle man pages.

OK'd martin@
 1.20 31-Jul-2006  martin Make filehandles opaque to userland
 1.19 13-Jul-2006  wiz "file system", mark up NULL, use Brq for braces,
start sentence with uppercase letter.
 1.18 13-Jul-2006  martin Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 11-Dec-1999  msaitoh branches: 1.11.6;
use .Er
 1.10 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 29-Aug-1998  lukem branches: 1.9.6;
first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.8 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.7 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.4 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.24 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.23 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.22 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.21 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.20 01-Oct-2002  wiz Expand abbreviation.
 1.19 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.18 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.17 16-Sep-2001  wiz Boring whitespace fixes.
 1.16 09-Apr-2001  wiz getmntinfo(3) not (2)
 1.15 28-Feb-2000  enami branches: 1.15.4; 1.15.6;
Sync wi/ reality.
 1.14 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.13 07-Dec-1998  abs branches: 1.13.6;
Add links to getmntinfo(3) and getfsstat(2)
 1.12 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.11 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.10 02-Feb-1998  perry merge lite-2
 1.9 18-Dec-1997  mikel sync struct statfs with <sys/mount.h>
 1.8 21-May-1997  pk MNAMELEN is 90.
 1.7 09-Aug-1996  thorpej Phrasing/formatting tweaks, from Kenneth Stailey <kstailey@dol-esa.gov>
in PR #2677.
 1.6 29-Jun-1995  cgd make these manual pages match current reality
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Format ERROR values like all the other manual pages.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.15.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.15.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.15.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.15.4.1 26-Apr-2001  he Pull up revision 1.16 (requested by wiz):
Correct getmntinfo(3) reference.
 1.19 03-Apr-2010  jruoho Add some history.
 1.18 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 02-Dec-1999  kleink branches: 1.11.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 22-Mar-1999  garbled branches: 1.10.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9 08-Feb-1999  is Fix typo
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 16-Jul-1997  mikel xref setgid(2) not nonexistent setgid(3), sort xrefs
 1.6 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 04-Oct-1993  jtc Changed SYNOPSIS, #include <unistd.h> too.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.11.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.23 14-Jul-2013  njoly Switch a few remaining system/pathname configuration variables from
"Dv {xxx}" to "Brq Dv xxx".
 1.22 13-Oct-2006  wiz branches: 1.22.42; 1.22.48;
Sort SEE ALSO.
 1.21 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 02-Dec-1999  kleink branches: 1.13.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 22-Mar-1999  garbled branches: 1.12.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.10 16-Feb-1998  kleink Remove the inclusion of <sys/param.h> from SYNOPSIS: it is neither necessary
nor mandated by the standard.
 1.9 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.8 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.7 19-Apr-1994  jtc Add curly braces around NGROUPS_MAX.
This convention is used in manpages for other UN*X systems to refer to
system values (availiable via sysconf() or pathconf()) rather than
definitions in <limits.h>.
 1.6 15-Apr-1994  jtc Describe special case when gidsetlen == 0.
NGROUPS -> NGROUPS_MAX.
 1.5 29-Mar-1994  jtc Last weekend's gid_t changes allow us to change the gidset argument of
getgroups() and setgroups() from a int ptr to a gid_t ptr.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 04-Oct-1993  jtc Changed SYNOPSIS, include <sys/types.h>.
Still need to change code and manpage such that gidset array is gid_t.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.13.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4 07-May-1994  mycroft Clean up deleted files.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4 07-May-1994  mycroft Clean up deleted files.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.29 27-Apr-2019  pgoyette s/three/multiple/

Adjust text for consistency. There are already more than three interval
timers available, and who knows if even more might be added in the future.
 1.28 27-Oct-2011  christos branches: 1.28.42;
document ITIMER_MONOTONIC.
 1.27 03-Oct-2011  njoly Note functions failure for unknown timer type.
 1.26 02-May-2011  jruoho Note also that the interaction between setitimer(2) and alarm(3) or sleep(3)
is unspecified.
 1.25 02-May-2011  jruoho Remove NOTES as it is documented in itimerval(3). Remove #ifdefs from
SYNOPSIS (these are visible enough in the body of the text). Use a list for
the timers. Improve wording and markup.
 1.24 30-Apr-2010  jruoho Reference timeradd(3).
 1.23 30-Apr-2010  jruoho Add STANDARDS section. Note that both functions were marked as obsolescent
in POSIX (2008); "timer_gettime(2) and timer_settime(2) should be used".
 1.22 14-Aug-2004  wiz Add an article.
 1.21 14-Aug-2004  jdolecek document timeradd() and timersub() too, as e.g. select(2) points
to getitimer(2) for timersub() description

use .Fn rather than .Fa for the macro names

bump date
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 27-Apr-2004  kleink POSIX-2001: Add restrict keywords to gettimeofday(2) and setitimer(2);
further deprecate struct timezone usage by changing `tzp' argument to
gettimeofday() to void *; align utimes(2) declaration by changing `times`
argument from struct timeval * to struct timeval[2]. From Murray
Armfield in PR standards/25331.

In due curse, reflect these changes in futimes(2), lutimes(2), and
settimeofday(2).
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.14 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.13 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 02-Dec-1999  kleink branches: 1.11.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 22-Mar-1999  garbled branches: 1.10.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9 11-Dec-1998  is mention poll(2)
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 02-Feb-1998  perry merge lite-2
 1.6 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 17-Oct-1994  cgd either change or update references to sigvec(), as appropriate
 1.3 25-Nov-1993  jtc branches: 1.3.2;
Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.3.2.1 17-Oct-1994  cgd from trunk.
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.11.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.28.42.1 10-Jun-2019  christos Sync with HEAD
 1.22 11-Jan-2009  christos merge christos-time_t
 1.21 06-Jan-2009  lukem Change the second argument of getlogin_r() from int to size_t, per POSIX.
 1.20 25-Jun-2008  ad branches: 1.20.4; 1.20.6;
Add getlogin_r. Manual page changes mostly lifted from FreeBSD.
 1.19 13-May-2004  wiz branches: 1.19.26;
\- is a minus, not -.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.14 20-Aug-2002  wiz Refer setpgid, not setpgrp, since the former is POSIX and the latter is
just there for compatibility.
 1.13 11-Aug-2002  yamt bring in warnings from freebsd via openbsd.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 24-Sep-1999  sommerfeld Correct the reference to the current value of MAXLOGNAME to reflect reality
 1.8 22-Mar-1999  garbled branches: 1.8.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.7 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.6 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.5 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.5 27-Aug-2002  nathanw Catch up to -current.
 1.10.6.4 13-Aug-2002  nathanw Catch up to -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.19.26.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.20.6.2 10-Jan-2009  christos sync with head.
 1.20.6.1 25-Jun-2008  christos file getlogin.2 was added on branch christos-time_t on 2009-01-10 22:59:51 +0000
 1.20.4.1 16-Jan-2009  snj Pull up following revision(s) (requested by lukem in ticket #247):
include/unistd.h: revision 1.119
lib/libc/gen/getlogin.c: revision 1.14
lib/libc/sys/getlogin.2: revision 1.21
Change the second argument of getlogin_r() from int to size_t, per POSIX.
 1.4 07-May-1994  mycroft Clean up deleted files.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.21 03-Jun-2011  wiz Sort errors.
 1.20 03-Jun-2011  jruoho Note STANDARDS and use more markup.
 1.19 05-Mar-2006  agc branches: 1.19.42;
Fix two unusual capitalisations, and add a preposition which had gone
missing.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Mar-2003  wiz Fix capitalisation of "indicates". From Todd C. Miller/OpenBSD.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 11-Aug-2002  yamt - include typical uses.
from openbsd.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 22-Oct-2001  kleink Sprinkle some __restrict into <sys/socket.h>.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 10-Feb-1999  kleink Reflect the addition of socklen_t.
 1.7 07-Jun-1998  enami Rename section DIAGNOSTICS to RETURN VALUES as descirbed in mdoc.samples(7).
While I'm here, sort some SEE ALSO section and uncapitalize symbol name.
 1.6 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.5 13-Aug-2002  nathanw Catch up to -current.
 1.10.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.19.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.24 19-Sep-2014  wiz Sort sections. From Henning Petersen in PR 49222.
 1.23 23-Mar-2009  joerg Remove/convert physical markup.
 1.22 07-Aug-2003  agc branches: 1.22.42;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.21 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.20 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.19 11-Aug-2002  yamt backout previous partly:
we don't check if processes are in the same session or not.
 1.18 11-Aug-2002  yamt bring in ERRORS from openbsd.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 02-Dec-1999  kleink branches: 1.16.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.15 22-Mar-1999  garbled branches: 1.15.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.14 03-Feb-1998  perry fix grammar nit -- 'its' is possessive, not 'it's'
 1.13 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.12 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.11 09-Sep-1997  jtc branches: 1.11.2;
Changed order of STANDARDS and HISTORY subheads to conform with
specification in mdoc(7).
 1.10 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.9 09-Aug-1996  mrg update for new reboot(2).
 1.8 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.7 31-Jan-1994  jtc More spelling errors
 1.6 01-Dec-1993  jtc Manpage formatting tweaks.
 1.5 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.4 04-Oct-1993  jtc Changed SYNOPSIS, include <sys/types.h> before <unistd.h>.
 1.3 01-Aug-1993  mycroft Add RCS indentifiers.
 1.2 16-May-1993  cgd getpgrp actually takes void. ask the IEEE...
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.2.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.15.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.6.3 13-Aug-2002  nathanw Catch up to -current.
 1.16.6.2 22-Mar-2002  nathanw Catch up to -current.
 1.16.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.22.42.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.17 03-Apr-2010  jruoho Add some history.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.6 11-Jul-1997  mikel xref gethostid(3) not gethostid(2)
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 04-Oct-1993  jtc Changed SYNOPSIS, include <sys/types.h> before <unistd.h>
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.20 13-Apr-2012  wiz Sort errors.
 1.19 13-Apr-2012  yamt - fix ambiguous sentences.
- mention scheduling class.
 1.18 11-Mar-2009  joerg branches: 1.18.6;
Fix markup
 1.17 13-May-2004  wiz branches: 1.17.36;
\- is a minus, not -.
 1.16 25-Apr-2004  kleink POSIX-2001: Change the `who' argument to [gs]etpriority(2) from int
to id_t. Partially addressing PR standards/25216 from Murray Armfield.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Boring whitespace fixes.
 1.9 01-Sep-2001  simonb Don't need <sys/types.h> or <sys/time.h> before <sys/resource.h>.
References: SUSv2
 1.8 02-Dec-1999  kleink branches: 1.8.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 20-Aug-1999  ross branches: 1.7.4;
Note that nice +19 and nice +20 guarantee exclusion w.r.t. priority <= 0.
 1.6 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.8.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.8.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.8.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.17.36.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.18.6.1 17-Apr-2012  yamt sync with head
 1.3 02-Jul-2023  riastradh getrandom(2): Reduce editorializing tone in man page.

XXX pullup-10
 1.2 30-Jun-2023  riastradh getrandom(2), getentropy(3): Rework man pages.

Make supportable promises. Omit needless verbiage. Give caveats
with cross-references to entropy(7). Emphasize that security is
necessarily relative to system configuration.

XXX pullup-10
 1.1 14-Aug-2020  riastradh branches: 1.1.6;
New system call getrandom() compatible with Linux and others.

Three ways to call:

getrandom(p, n, 0) Blocks at boot until full entropy.
Returns up to n bytes at p; guarantees
up to 256 bytes even if interrupted
after blocking. getrandom(0,0,0)
serves as an entropy barrier: return
only after system has full entropy.

getrandom(p, n, GRND_INSECURE) Never blocks. Guarantees up to 256
bytes even if interrupted. Equivalent
to /dev/urandom. Safe only after
successful getrandom(...,0),
getrandom(...,GRND_RANDOM), or read
from /dev/random.

getrandom(p, n, GRND_RANDOM) May block at any time. Returns up to n
bytes at p, but no guarantees about how
many -- may return as short as 1 byte.
Equivalent to /dev/random. Legacy.
Provided only for source compatibility
with Linux.

Can also use flags|GRND_NONBLOCK to fail with EWOULDBLOCK/EAGAIN
without producing any output instead of blocking.

- The combination GRND_INSECURE|GRND_NONBLOCK is the same as
GRND_INSECURE, since GRND_INSECURE never blocks anyway.

- The combinations GRND_INSECURE|GRND_RANDOM and
GRND_INSECURE|GRND_RANDOM|GRND_NONBLOCK are nonsensical and fail
with EINVAL.

As proposed on tech-userlevel, tech-crypto, tech-security, and
tech-kern, and subsequently adopted by core (minus the getentropy part
of the proposal, because other operating systems and participants in
the discussion couldn't come to an agreement about getentropy and
blocking semantics):

https://mail-index.netbsd.org/tech-userlevel/2020/05/02/msg012333.html
 1.1.6.1 11-Aug-2023  martin Pull up following revision(s) (requested by riastradh in ticket #319):

sys/dev/pci/ubsec.c: revision 1.64
sys/dev/pci/hifn7751.c: revision 1.82
lib/libc/gen/getentropy.3: revision 1.5
lib/libc/gen/getentropy.3: revision 1.6
share/man/man4/rnd.4: revision 1.41
lib/libc/sys/getrandom.2: revision 1.2
lib/libc/sys/getrandom.2: revision 1.3
share/man/man5/rc.conf.5: revision 1.193
share/man/man7/entropy.7: revision 1.5
share/man/man7/entropy.7: revision 1.6
share/man/man7/entropy.7: revision 1.7
share/man/man7/entropy.7: revision 1.8
etc/security: revision 1.130
share/man/man7/entropy.7: revision 1.9
etc/security: revision 1.131
sys/crypto/cprng_fast/cprng_fast.c: revision 1.19
sys/sys/rndio.h: revision 1.3
tests/lib/libc/sys/t_getrandom.c: revision 1.5
etc/defaults/rc.conf: revision 1.164
etc/defaults/rc.conf: revision 1.165
sys/sys/rndsource.h: revision 1.10
sys/kern/kern_entropy.c: revision 1.62
sys/kern/kern_entropy.c: revision 1.63
sys/kern/kern_entropy.c: revision 1.64
sys/kern/subr_cprng.c: revision 1.44
sys/kern/kern_entropy.c: revision 1.65
sys/kern/kern_clock.c: revision 1.149
sys/dev/pci/viornd.c: revision 1.22
share/man/man9/rnd.9: revision 1.32
sys/kern/subr_prf.c: revision 1.202
sys/sys/rndsource.h: revision 1.8
sys/sys/rndsource.h: revision 1.9
share/man/man7/entropy.7: revision 1.10

1. Reinstate netbsd<=9 entropy estimator to unblock /dev/random, in
parallel with assessment of only confident entropy sources (seed,
HWRNG) for security warnings like sshd keys in motd and daily
insecurity report.

2. Make multiuser boot wait for first /dev/random output soon after
loading a seed and configuring rndctl, so that getentropy(3) meets
its contract starting early at boot without introducing blocking
paths that could cause hangs in init(8) or single-user mode.
Operators can choose to disable this wait in rc.conf.

3. Fix some bugs left over from reducing the global entropy lock from
a spin lock at IPL_VM to an adaptive lock at IPL_SOFTSERIAL.

4. Update man pages.
 1.36 09-Jun-2012  christos describe RLIMIT_NTHR
 1.35 13-Feb-2012  dholland Update dangling references to quotactl(2), mostly now libquota(3), and to
quotactl(8), mostly now quotarestore(8). ok riz@
 1.34 16-Nov-2011  wiz Remove trailing whitespace. Merge two EINVAL entries.
 1.33 15-Nov-2011  christos mention RLIMIT_RSS is borked.
 1.32 01-Jul-2009  wiz branches: 1.32.6;
Bump date for previous.
 1.31 01-Jul-2009  mrg document RLIMIT_AS. text from freebsd. fixes PR#41517.
 1.30 11-Mar-2009  joerg Fix markup
 1.29 13-May-2004  wiz branches: 1.29.32; 1.29.36; 1.29.38;
\- is a minus, not -.
 1.28 19-Apr-2004  wiz Fix typo in xref.
 1.27 19-Apr-2004  lukem Document RLIMIT_SBSIZE.
 1.26 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.25 14-Jul-2003  wiz cpu -> CPU, from jmc@openbsd.
 1.24 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.23 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.22 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.21 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.20 24-Nov-2001  jdolecek comment out the STANDARDS section for now
 1.19 23-Nov-2001  wiz Two punctuation-vs.-macro improvements, and a grammar fix.
 1.18 23-Nov-2001  jdolecek document new error cases
state standard conformancy - besides RLIMIT_AS (which is not supported
currently), getrlimit()/setrlimit() conform to SUSv2
use more standard description cookie for error return in RETURN VALUES
mention also ulimit of sh(1), besides limit of csh(1)
 1.17 16-Sep-2001  wiz Boring whitespace fixes.
 1.16 01-Sep-2001  simonb Don't need <sys/types.h> or <sys/time.h> before <sys/resource.h>.
References: SUSv2
 1.15 02-Dec-1999  kleink branches: 1.15.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.14 28-Sep-1999  bouyer Document CTL_PROC, the core filename format it core(5), and xref sysctl(8),
sysctl(3), core(5) in various place.
Document 'options DEFCORENAME' inj options(4) and $defcorename in rc.conf(5).
 1.13 22-Mar-1999  garbled branches: 1.13.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.11 28-Apr-1998  fair fix mdoc references
 1.10 16-Jul-1997  mikel xref quotactl(2) not nonexistent quota(2)
 1.9 04-Oct-1996  scottr Remove outdated BUGS section (from Mike Long, PR 2804)
 1.8 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 08-Dec-1994  jtc Changed type of struct rlimit from quad_t to rlim_t.
Changed RLIM_INFINITY to 64 bit quantity.
 1.5 17-Oct-1994  cgd either change or update references to sigvec(), as appropriate
 1.4 04-May-1994  cgd branches: 1.4.2;
rlimit stuff, and more. bump shlib major, for rlimit change, and for
safety (now that hackish off_t stuff gone completely.)
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 17-Oct-1994  cgd from trunk.
 1.13.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.15.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.15.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.15.6.2 28-Jan-2002  nathanw Catch up to -current.
 1.15.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.29.38.1 01-Jul-2009  snj branches: 1.29.38.1.2;
Pull up following revision(s) (requested by mrg in ticket #846):
lib/libc/sys/getrlimit.2: revision 1.31, 1.32
document RLIMIT_AS. text from freebsd. fixes PR#41517.
 1.29.38.1.2.1 21-Apr-2010  matt sync to netbsd-5
 1.29.36.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.29.32.1 01-Jul-2009  snj Pull up following revision(s) (requested by mrg in ticket #846):
lib/libc/sys/getrlimit.2: revision 1.31, 1.32
document RLIMIT_AS. text from freebsd. fixes PR#41517.
 1.32.6.2 30-Oct-2012  yamt sync with head
 1.32.6.1 17-Apr-2012  yamt sync with head
 1.18 13-May-2004  wiz \- is a minus, not -.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.10 16-Sep-2001  wiz Boring whitespace fixes.
 1.9 01-Sep-2001  simonb Don't need <sys/types.h> or <sys/time.h> before <sys/resource.h>.
References: SUSv2
 1.8 02-Dec-1999  kleink branches: 1.8.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 22-Mar-1999  garbled branches: 1.7.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.6 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.5 21-Mar-1997  mikel make manpage match header; from Brian Grayson in PR misc/3367
(partial fix).
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.8.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.8.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.8.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.11 04-Apr-2011  jruoho Use .Fn for functions.
 1.10 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.9 13-May-2004  wiz \- is a minus, not -.
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.7 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.6 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.5 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 16-Sep-2001  wiz Boring whitespace fixes.
 1.3 02-Dec-1999  kleink branches: 1.3.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.2 09-Mar-1999  ross branches: 1.2.6;
More missing .El's.
 1.1 14-Feb-1998  thorpej Document getsid(2).
 1.2.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.3.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.3.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.26 30-Jul-2016  wiz Sort errors.
 1.25 30-Jul-2016  njoly Remove obsolete BUGS section. getsockname(2) report sensible values
for bound UNIX domain sockets.
 1.24 09-Jul-2012  jdf branches: 1.24.14;
Add ENOTCONN to returned error codes, bump date.
Tip of asau.
 1.23 07-Aug-2003  agc branches: 1.23.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.22 01-May-2003  gmcgarry Mention EINVAL. From PR#17921.
 1.21 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.20 18-Mar-2003  wiz Fix capitalisation of "indicates". From Todd C. Miller/OpenBSD.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 06-Jan-2003  wiz descriptor with a c.
 1.17 11-Aug-2002  yamt more description from openbsd.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 22-Oct-2001  kleink Sprinkle some __restrict into <sys/socket.h>.
 1.14 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.13 16-Sep-2001  wiz Boring whitespace fixes.
 1.12 02-Dec-1999  kleink branches: 1.12.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 10-Feb-1999  kleink Reflect the addition of socklen_t.
 1.9 07-Jun-1998  enami Rename section DIAGNOSTICS to RETURN VALUES as descirbed in mdoc.samples(7).
While I'm here, sort some SEE ALSO section and uncapitalize symbol name.
 1.8 28-Apr-1998  fair fix mdoc references
 1.7 28-Apr-1998  fair Change occurrences of "UNIX" to .Ux or .At as appropriate.
 1.6 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.6 08-Jan-2003  thorpej Sync with HEAD.
 1.12.6.5 13-Aug-2002  nathanw Catch up to -current.
 1.12.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.12.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.12.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.12.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.23.56.1 30-Oct-2012  yamt sync with head
 1.24.14.1 06-Aug-2016  pgoyette Sync with HEAD
 1.42 08-Aug-2021  nia introduce a SOL_LOCAL for unix-domain socket level socket options
as an alias of the current 0 used for these options, as in FreeBSD.

reviewed by many.
 1.41 09-May-2019  wiz Remove trailing whitespace.
 1.40 08-May-2019  christos mention truncation of the result if the size in optlen is less that the
size of the option to be returned in optval.
 1.39 05-Nov-2018  wiz Fix xref.
 1.38 04-Nov-2018  christos - Introduce a new SO_RERROR socket option to explicitly turn on
receive overflow errors re-instating the default behavior to
silently ignore them as before 2018-03-19.
- Introduce a new kern.sooptions sysctl to control the default
behavior of socket options. Setting this to 0x4000 (SO_RERROR),
turns on receive overflow error reporting for all sockets.
- Change dhcpcd to turn on SO_RERROR on all its sockets.

As discussed in tech-net.
 1.37 31-Jul-2018  sevan Remove ISO references
 1.36 31-Jul-2018  rjs Userland changes for getsockopt2().
 1.35 25-Jan-2012  christos branches: 1.35.38; 1.35.40;
As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
 1.34 29-Jun-2009  wiz branches: 1.34.6;
Mark up NULL with Dv. Remove trailing whitespace.
 1.33 29-Jun-2009  plunky add mention of SO_ACCEPTFILTERS, language largely from FreeBSD manpage
 1.32 18-May-2009  wiz Sort errors.
 1.31 15-Mar-2009  joerg Declare all columns.
 1.30 16-Dec-2007  lukem branches: 1.30.14;
Add references to various protocol pages that support setsockopt(2).
Makes it much easier to find them.
 1.29 13-May-2004  wiz branches: 1.29.16;
\- is a minus, not -.
 1.28 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.27 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.26 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.25 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.24 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.23 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.22 22-Oct-2001  kleink Sprinkle some __restrict into <sys/socket.h>.
 1.21 16-Oct-2001  kleink Remove inclusion of <sys/types.h> from synopsis; it is no longer needed.
 1.20 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.19 19-May-2001  jdolecek Use EAGAIN instead of EWOULDBLOCK. The actual numeric value is
same, but EAGAIN is the posixly correct name.
Addresses misc/12960.
 1.18 02-Dec-1999  kleink branches: 1.18.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.17 22-Mar-1999  garbled branches: 1.17.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.16 10-Feb-1999  kleink Reflect the addition of socklen_t.
 1.15 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.14 28-Jul-1998  is Mention poll(2), too, where we formerly only mentioned select(2).
 1.13 28-Apr-1998  fair fix mdoc references
 1.12 02-Feb-1998  perry merge lite-2
 1.11 10-Jan-1998  enami Add missing comma in SEE ALSO list.
 1.10 05-Jan-1998  thorpej Actually document that SO_LINGER's linger time is measured in seconds.
 1.9 12-Jan-1997  thorpej Fix typo; control message type for SO_TIMESTAMP is SCM_TIMESTAMP.
 1.8 12-Jan-1997  thorpej Document the SO_TIMESTAMP socket option.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 16-Mar-1994  cgd fix from Paul Vixie for (probably a cut-and-paste) typo
 1.5 10-Jan-1994  jtc Fix spelling errors.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.17.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.18.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.18.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.18.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.18.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.29.16.1 09-Jan-2008  matt sync with HEAD
 1.30.14.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.34.6.1 17-Apr-2012  yamt sync with head
 1.35.40.1 10-Jun-2019  christos Sync with HEAD
 1.35.38.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.35.38.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.30 16-Oct-2022  christos Add EINVAL doc from Jan Schaumann
 1.29 09-Dec-2015  wiz Fix date.
 1.28 07-Dec-2015  pgoyette Update to match reality. For these functions, we still try the system
call first, and only fall back to /dev/clockctl if the system call
fails.
 1.27 18-May-2010  jruoho Refer to timeval(3) and only describe the legacy struct timezone here.

Improve markup.
 1.26 16-Jan-2009  drochner update struct timeval
 1.25 13-Oct-2006  wiz Fix date string.
 1.24 13-May-2004  wiz \- is a minus, not -.
 1.23 27-Apr-2004  kleink POSIX-2001: Add restrict keywords to gettimeofday(2) and setitimer(2);
further deprecate struct timezone usage by changing `tzp' argument to
gettimeofday() to void *; align utimes(2) declaration by changing `times`
argument from struct timeval * to struct timeval[2]. From Murray
Armfield in PR standards/25331.

In due curse, reflect these changes in futimes(2), lutimes(2), and
settimeofday(2).
 1.22 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.21 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.20 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.19 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.18 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.17 12-Jan-2002  yamt fix a typo.
(syper -> super)
 1.16 16-Oct-2001  wiz Boring whitespace or punctuation fixes.
 1.15 16-Sep-2001  manu Added support to use the clockctl driver if present for adjtime(),
clock_settime(), ntp_adjtime() and settimeofday(). The super-user still
always use the plain system call.
Approved by Christos
 1.14 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.13 16-Sep-2001  wiz Boring whitespace fixes.
 1.12 02-Dec-1999  kleink branches: 1.12.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 02-Feb-1998  perry merge lite-2
 1.9 09-Oct-1997  mycroft Document that the time zone is obselete, add an xref to localtime(3), and
update the HISTORY section.
 1.8 26-Apr-1997  tls document kernel change
 1.7 12-Jan-1997  perry minor formatting tweak
 1.6 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.12.6.5 22-Mar-2002  nathanw Catch up to -current.
 1.12.6.4 08-Mar-2002  nathanw Catch up to -current.
 1.12.6.3 28-Jan-2002  nathanw Catch up to -current.
 1.12.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.12.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.18 01-Sep-2019  sevan getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.17 05-Apr-2010  wiz branches: 1.17.46; 1.17.48;
Fix date.
 1.16 03-Apr-2010  jruoho Add some history.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 25-Nov-1993  jtc Misc manpage fixes.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 04-Oct-1993  jtc Changed SYNOPSIS, <sys/types.h> should be included _before_ <unistd.h>,
not after.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.3 21-Jun-2002  nathanw Catch up to -current.
 1.10.6.2 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.17.48.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.17.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4 27-Mar-2021  dholland In getvfsstat(2), clarify that the size argument is in bytes.

That the size argument is in bytes (not the count of structures) and
the return value is the count of structures (not bytes) is
counterintuitive.
 1.3 19-May-2006  tsutsui - getvfsstat(2) isn't in 2.1 but 3.0
- getffstat() -> getfsstat()
 1.2 21-Apr-2004  wiz Mark up NULL, and fix a minus.
 1.1 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.62 04-Dec-2022  uwe Sections 2 and 3 have RETURN VALUES, not DIAGNOSTICS
 1.61 08-Mar-2020  mgorny PR standards/44921: Add errno consts for robust mutexes

Add the two missing errno.h constants: EOWNERDEAD and ENOTRECOVERABLE.
While technically they're used for robust mutexes which we do not
support at the moment, they are listed in POSIX and used by libc++.
While libc++ can be made to build without it, it just locally redefines
the values then, so we may as well define them globally.
 1.60 03-Jul-2017  wiz branches: 1.60.6;
Remove workaround for ancient HTML generation code.
 1.59 14-May-2017  wiz file system police.
 1.58 02-Nov-2016  pgoyette branches: 1.58.4;
Typo - "a requests" --> "a request"
 1.57 22-Apr-2015  wiz branches: 1.57.2;
Remove trailing whitespace.
 1.56 21-Apr-2015  christos Mention EWOULDBLOCK too since a lot of the source code and documentation still
refers to it.
 1.55 22-Mar-2010  joerg branches: 1.55.24;
Use .In for header files instead of .Ar Pa and variations.
 1.54 23-Jul-2009  wiz Bump date for previous.
 1.53 23-Jul-2009  dholland Mention, along with the behavior of succeeding system calls, the
normal behavior of succeeding library functions regarding errno.
(That is, they may leave arbitrary nonzero values in errno.)

Ok kleink@; related to PR lib/41567 as well as a recent thread on
tech-userlevel.
 1.52 02-Jun-2009  pooka document errnos 59 and 71. government denies knowledge.
 1.51 11-Jan-2009  christos merge christos-time_t
 1.50 29-Nov-2008  jnemeth PR/40060 - Bug Hunting -- grammar fix
 1.49 13-Feb-2008  rillig branches: 1.49.10; 1.49.12; 1.49.14;
Aligned the text of ENXIO with the one in gen/errlist.c.
 1.48 04-Nov-2007  pooka remember to bump date
 1.47 04-Nov-2007  pooka libc errlist uses "Block device required" for ENOTBLK, so display
that also here.
 1.46 22-Dec-2006  pooka branches: 1.46.4;
markup fixes
 1.45 31-Oct-2006  cbiere branches: 1.45.2; 1.45.6;
Changed error message of ENOPROTOOPT to "Protocol option not available".
 1.44 24-Feb-2006  wiz Bump date for previous.
 1.43 21-Feb-2006  christos Text for the 3 new error messages, from Elad.
 1.42 20-Jan-2005  kleink Note ENOATTR; from FreeBSD.
 1.41 02-Jan-2005  jmmv Remove a trailing dot to match all other items in the same list.
 1.40 03-Jul-2004  mycroft Cardbus -> CardBus
 1.39 13-May-2004  wiz \- is a minus, not -.
 1.38 08-Jan-2004  wiz Fix some spacing nits, an Xref section, and a long line.
Bump date for previous.
 1.37 07-Jan-2004  christos - Describe all system threads.
- Mention all MI threads that are not device specific; i.e. mention scsibus,
usb, raidframe, nfs, but not pms.
 1.36 25-Nov-2003  kleink Catch up with namei: An empty string is not a valid pathname.
Noted by SAITOH Akinori in PR misc/23565.
 1.35 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.34 27-May-2003  kleink Add ETIME, per POSIX-2001.
 1.33 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.32 09-Apr-2003  kleink Change the strerror() string for ERANGE consistently to "Result too
large or too small" and reword its intro(2) description to reflect
the present use for non-numerical out-of-range errors; resolves
Andrew Brown's PR standards/21004, the discussion of which was
dramatically sped up by repeated whipping from Perry Metzger. :-)
 1.31 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.30 12-Nov-2002  kleink Review oversight: ENOSR: resource -> resources, which is what the
standard says, and which fits the resource allocation failure better.
Also, bump the date.
 1.29 12-Nov-2002  skrll Add the missing errno symbols that are defined in IEEE Std 1003.1-2001.
The language message files need updating.

Change reviewed and OK'd by Klaus Klein.
 1.28 20-Jul-2002  yamt reflect current value of MAXSYMLINKS. from FreeBSD.
 1.27 08-Feb-2002  ross branches: 1.27.2;
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.26 25-Apr-2001  simonb Spell occurred correctly.
 1.25 09-Apr-2001  wiz getrlimit(2), not (3)
 1.24 16-Mar-2001  fair Added the following text to answer PR 7249:

The manual page for each system call will list some of the
common errno codes that system call can return, but that
should not be considered an exhaustive list, i.e. a properly
written program should be able to gracefully recover from
any error that a system call might return. Documenting
all the error codes that a system call can return in a more
specification-like manner would take more resources than
this project has available.
 1.23 13-Mar-2001  fair Add a description of the special kernel thread "ioflush" to the "special
processes" section, per PR 10912. While we're here, clean up nroff nits,
like spaces at the ends of lines.
 1.22 14-Mar-2000  kleink branches: 1.22.4; 1.22.6;
Note EILSEQ.
 1.21 14-Mar-2000  kleink Sync the description of errno with reality; fixes PR lib/9496.
 1.20 06-Jun-1999  kleink Note that an EFAULT condition cannot be guaranteed to be detected (i.e. in the
MD implementation of pipe(2)); addresses PR kern/7720.
 1.19 24-Mar-1999  mycroft branches: 1.19.2;
Fix a few things that were out of date or just plain wrong, and clean up some
formatting glitches.
 1.18 24-Mar-1999  hubertf Better explain possible EBADF causes.
Patches submitted by Greg A. Woods <woods@planix.com> in PR lib/7206.
 1.17 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.16 22-Mar-1999  kleink Bump the date.
 1.15 22-Mar-1999  kleink Introduce EOVERFLOW.
 1.14 09-Mar-1999  ross Missing .El.
 1.13 30-Apr-1998  fair fix .Xr reference
 1.12 08-Feb-1998  kleink * Add an entry for ENOMSG that fits its wild semantics.
* Change all references from <sys/errno.h> to <errno.h>, which is the
canonical location of that file.
* Bump the date.
 1.11 06-Feb-1998  mikel add descriptions for EFTYPE, EAUTH, ENEEDAUTH, and EIDRM
 1.10 02-Feb-1998  perry merge lite-2
 1.9 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.8 11-Jul-1997  mikel branches: 1.8.2;
xref getdtablesize(3) not getdtablesize(2)
 1.7 13-May-1997  mikel xrefs need section numbers
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 31-Jan-1994  jtc More spelling errors
 1.4 10-Jan-1994  jtc Fix spelling errors.
 1.3 15-Oct-1993  jtc Use .Xr for SEE ALSO cross references.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.2.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.19.2.1 29-Mar-2000  he Pull up revisions 1.20-1.21 (requested by kleink):
Note that EFAULT can't be guaranteed in e.g. pipe(2); fixes PR#7720.
Update the description of errno. Fixes PR#9496.
 1.22.6.5 12-Nov-2002  skrll Catch up to -current.
 1.22.6.4 01-Aug-2002  nathanw Catch up to -current.
 1.22.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.22.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.22.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.4.2 15-Mar-2003  he Pull up revision 1.28 (requested by yamt in ticket #11):
Reflect current value of MAXSYMLINKS.
 1.22.4.1 26-Apr-2001  he Pull up revision 1.25 (requested by wiz):
Correct getrlimit(2) reference.
 1.27.2.3 26-Nov-2003  cyber ticket 1567: revert .It change as its not applicable yet
 1.27.2.2 26-Nov-2003  cyber Pull up revision 1.36 (requested by kleink in ticket #1567):
Catch up with namei: An empty string is not a valid pathname.
Noted by SAITOH Akinori in PR misc/23565.
 1.27.2.1 21-Jul-2002  lukem Pull up revision 1.28 (requested by yamt in ticket #532):
reflect current value of MAXSYMLINKS. from FreeBSD.
 1.45.6.2 18-Aug-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1344):
lib/libc/sys/intro.2: revision 1.50 via patch
PR/40060 - Bug Hunting -- grammar fix
 1.45.6.1 18-Aug-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1340):
lib/libc/sys/intro.2: revision 1.53
lib/libc/sys/intro.2: revision 1.54
Mention, along with the behavior of succeeding system calls, the
normal behavior of succeeding library functions regarding errno.
(That is, they may leave arbitrary nonzero values in errno.)
Ok kleink@; related to PR lib/41567 as well as a recent thread on
tech-userlevel.
Bump date for previous.
 1.45.2.2 18-Aug-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1344):
lib/libc/sys/intro.2: revision 1.50 via patch
PR/40060 - Bug Hunting -- grammar fix
 1.45.2.1 18-Aug-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1340):
lib/libc/sys/intro.2: revision 1.53
lib/libc/sys/intro.2: revision 1.54
Mention, along with the behavior of succeeding system calls, the
normal behavior of succeeding library functions regarding errno.
(That is, they may leave arbitrary nonzero values in errno.)
Ok kleink@; related to PR lib/41567 as well as a recent thread on
tech-userlevel.
Bump date for previous.
 1.46.4.2 23-Mar-2008  matt sync with HEAD
 1.46.4.1 06-Nov-2007  matt sync with HEAD
 1.49.14.2 26-Jul-2009  snj branches: 1.49.14.2.2;
Pull up following revision(s) (requested by dholland in ticket #872):
lib/libc/sys/intro.2: revision 1.50 via patch
PR/40060 - Bug Hunting -- grammar fix
 1.49.14.1 26-Jul-2009  snj Pull up following revision(s) (requested by dholland in ticket #867):
lib/libc/sys/intro.2: revisions 1.53, 1.54
Mention, along with the behavior of succeeding system calls, the
normal behavior of succeeding library functions regarding errno.
(That is, they may leave arbitrary nonzero values in errno.)
Ok kleink@; related to PR lib/41567 as well as a recent thread on
tech-userlevel.
 1.49.14.2.2.1 21-Apr-2010  matt sync to netbsd-5
 1.49.12.1 04-Jan-2009  christos merge with head.
 1.49.10.2 26-Jul-2009  snj Pull up following revision(s) (requested by dholland in ticket #872):
lib/libc/sys/intro.2: revision 1.50 via patch
PR/40060 - Bug Hunting -- grammar fix
 1.49.10.1 26-Jul-2009  snj Pull up following revision(s) (requested by dholland in ticket #867):
lib/libc/sys/intro.2: revisions 1.53, 1.54
Mention, along with the behavior of succeeding system calls, the
normal behavior of succeeding library functions regarding errno.
(That is, they may leave arbitrary nonzero values in errno.)
Ok kleink@; related to PR lib/41567 as well as a recent thread on
tech-userlevel.
 1.55.24.1 16-May-2015  snj Pull up following revision(s) (requested by christos in ticket #780):
lib/libc/sys/intro.2: revisions 1.56, 1.57
Mention EWOULDBLOCK too since a lot of the source code and documentation still
refers to it.
--
Remove trailing whitespace.
 1.57.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.58.4.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.60.6.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.23 19-Dec-2010  wiz Remove trailing whitespace; sort errors; spell "variadic" like
Wikipedia or GNU libc.
 1.22 19-Dec-2010  christos Make the ioctl prototype reflect reality and explain why. Also mention that
the generic file descriptor manipulation ioctls are superceded by the
equivalent fcntl one.
 1.21 11-May-2010  mbalmer Correctly spell 'acknowledged'.

Found by Christian Brueffer.
 1.20 08-Nov-2004  wiz branches: 1.20.32;
Bump date for FIONWRITE and FIONSPACE.
 1.19 06-Nov-2004  wrstuden Add support for FIONWRITE and FIONSPACE ioctls. FIONWRITE reports
the number of bytes in the send queue, and FIONSPACE reports the
number of free bytes in the send queue. These ioctls permit applications
to monitor file descriptor transmission dynamics.

In examining prior art, FIONWRITE exists with the semantics given
here. FIONSPACE is provided so that programs may easily determine how
much space is left in the send queue; they do not need to know the
send queue size.

The fact that a write may block even if there is enough space in the
send queue for it is noted in the documentation.

FIONWRITE functionality may be used to implement TIOCOUTQ for Linux
emulation - Linux extended this ioctl to sockets, even though they are
not ttys.
 1.18 13-May-2004  wiz \- is a minus, not -.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 20-Mar-2003  dsl FIONASYNC should be FIOASYNC
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 11-Aug-2002  yamt - document generic ioctls.
- mention EFAULT.
from OpenBSD.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.10 16-Sep-2001  wiz Boring whitespace fixes.
 1.9 02-Dec-1999  kleink branches: 1.9.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.8 25-Mar-1999  perry branches: 1.8.6;
argument is void *, not char * (at least, to the extent that it is a pointer.
 1.7 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.6 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.6.4 13-Aug-2002  nathanw Catch up to -current.
 1.9.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.9.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.9.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.20.32.1 21-Nov-2010  riz Pull up following revision(s) (requested by mbalmer in ticket #1395):
lib/libc/sys/ioctl.2: revision 1.21
Correctly spell 'acknowledged'.
Found by Christian Brueffer.
 1.12 21-Apr-2012  roy Add capfile(5) to describe the termcap format.
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.
 1.11 07-Aug-2003  agc branches: 1.11.56;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.10 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 07-Apr-2003  wiz Some e.g. cleanup: replace "eg" with "e.g.,". From Igor Sobrado in PR 19692.
 1.8 15-Mar-2003  wiz Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
 1.7 19-Jan-2003  wiz Bx Open -> Ox.
 1.6 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.5 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.4 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 09-Apr-2001  wiz Fix date, and some whitespace.
 1.2 21-Apr-2000  minoura branches: 1.2.6; 1.2.8;
issetugid(2) manpage.
 1.1 21-Apr-2000  minoura branches: 1.1.1;
Initial revision
 1.1.1.1 21-Apr-2000  minoura FreeBSD's issetugid(2) manpage.
 1.2.8.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.8.3 22-Mar-2002  nathanw Catch up to -current.
 1.2.8.2 08-Mar-2002  nathanw Catch up to -current.
 1.2.8.1 08-Oct-2001  nathanw Catch up to -current.
 1.2.6.2 08-Oct-2000  he Apply patch (requested by he):
State that this was imported in 1.4.3, and add a `The'.
 1.2.6.1 21-Apr-2000  he file issetugid.2 was added on branch netbsd-1-4 on 2000-10-08 15:41:30 +0000
 1.11.56.1 23-May-2012  yamt sync with head.
 1.24 08-Feb-2021  nia clarify what happens when kill(-1, ...) does nothing
 1.23 15-Jul-2014  wiz Clean up ERRORS (sort, merge).
 1.22 09-Jul-2014  christos mention sig == 0
 1.21 13-Jul-2008  dholland branches: 1.21.6; 1.21.26; 1.21.38;
Clarify one of the process-group-ID cases by saying "process group ID"
instead of just "group ID". This was sitting in my tree and I forget
the exact genesis - I think it came up in chat a couple months ago.
 1.20 13-May-2004  wiz branches: 1.20.26;
\- is a minus, not -.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 02-Dec-1999  kleink branches: 1.13.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 06-Oct-1999  jdolecek xref signal(7)
 1.11 22-Mar-1999  garbled branches: 1.11.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 15-Jul-1997  mikel xref killpg(3) not obsolete killpg(2), sort xrefs
 1.8 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 10-Jan-1994  jtc Fix spelling errors.
 1.5 15-Dec-1993  jtc More manpage tweaks.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.20.26.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.21.38.1 10-Aug-2014  tls Rebase.
 1.21.26.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.6.2 13-Jul-2008  dholland Clarify one of the process-group-ID cases by saying "process group ID"
instead of just "group ID". This was sitting in my tree and I forget
the exact genesis - I think it came up in chat a couple months ago.
 1.21.6.1 13-Jul-2008  dholland file kill.2 was added on branch christos-time_t on 2008-07-13 15:16:27 +0000
 1.60 28-Jul-2023  wiz Fix some macro( usage)s
 1.59 28-Jul-2023  christos Add epoll(2) from Theodore Preduta as part of GSoC 2023
 1.58 13-Feb-2022  pgoyette Fix typo
 1.57 23-Oct-2021  thorpej Add support for the EVFILT_EMPTY filter, which is activated when the
write buffer associated with the file descriptor is empty. This is
currently implemented only for sockets, and is intended primarily to
provide visibility to applications that all previously written data
has been acknowledged by the TCP layer on the receiver. Compatible
with the same filter in FreeBSD.
 1.56 20-Oct-2021  thorpej Oops, forgot to note the history of NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE,
and NOTE_READ.
 1.55 20-Oct-2021  thorpej Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
forcing each individual file system to deal with it (except VOP_RENAME(),
because VOP_RENAME() is a mess and we currently have 2 different ways
of handling it; at least it's reasonably well-centralized in the "new"
way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
to avoid doing work for events no one cares about (avoiding, e.g.
taking locks and traversing the klist to send a NOTE_WRITE when
someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
to be invoked before and after vop_pre() and vop_post(), respectively.
Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
vop_*_args structures. These context fields are used to convey information
between the file system VOP function and the VOP wrapper, but do not
occupy an argument slot in the VOP_*() call itself. These context fields
are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
back the resulting link count of the target vnode. Return this in tmpfs,
udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
 1.54 13-Oct-2021  thorpej Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER,
API-compatible with the same in FreeBSD.
 1.53 31-Oct-2020  christos add missing sentence.
 1.52 31-Oct-2020  wiz Remove trailing whitespace.
 1.51 31-Oct-2020  christos PR/55663: Ruslan Nikolaev: Add support for EVFILT_USER in kqueue(2)
 1.50 23-Dec-2019  kamil Explain in kevent(2) the semantics of EINTR

All changes contained in the changelist are applied before returning this
error.
 1.49 22-Dec-2019  kamil Document udata type switch in struct kevent in the kqueue(2)
 1.48 12-Apr-2019  abhinav Markup improvements: use Dv for kqueue filters, events and note names

ok wiz@
 1.47 09-Jan-2018  christos branches: 1.47.4;
Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
 1.46 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.45 07-Jun-2017  kamil EV_SET(2) - simplify description

Note only the information that it does not evaluate multiple times its
parameters.

Suggested by <wiz>.
 1.44 07-Jun-2017  abhinav s/filesystem/file system/

Thanks to Thomas for pointing out that in NetBSD man pages we try to use the convention of writing it
as "file system".
 1.43 06-Jun-2017  abhinav Bump date for previous
Fix typo: fileystem -> filesystem
 1.42 06-Jun-2017  kamil Update the EV_SET() description with newer implementation.

EV_SET(2) is a macro again, that wraps an inline function which is still
new in NetBSD 8.0.

Sponsored by <The NetBSD Foundation>
 1.41 31-May-2017  kamil Document transition of EV_SET() from a macro to a static inline function

Sponsored by <The NetBSD Foundation>
 1.40 11-Apr-2017  abhinav Use more markup for `struct timespec`
Use Xr to refer to timespec(3)
Add timespec(3) to SEE ALSO
 1.39 11-Apr-2017  abhinav s/Sets/Set: Use style consistent with the other sentences in that list.
Add .Pp before next sentence.
 1.38 02-Apr-2017  abhinav Fix sentence.
 1.37 01-Apr-2017  abhinav Add EV_SET() to the NAME section
Use Xr instead of Fn to refer other man pages
Add some more entries to SEE ALSO

Reviewed by wiz@
 1.36 19-Dec-2016  abhinav branches: 1.36.2;
Use markup for errno
Also remove a .Pp before .Bl while there
 1.35 08-Dec-2015  christos branches: 1.35.2;
PR/50506: Tobias Nygren: kqueue(2) lacks EV_DISPATCH/EV_RECEIPT support
 1.34 02-Mar-2015  christos say that we put the exit code in data.
 1.33 24-Nov-2012  christos branches: 1.33.8;
mention that kevent returns now EOPNOTSUPP.
 1.32 25-Jan-2012  christos branches: 1.32.2; 1.32.6; 1.32.8;
As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
 1.31 26-Jun-2011  christos branches: 1.31.2;
* Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.30 24-May-2011  ryo fix incorrect variable name
 1.29 13-Apr-2010  wiz Uncomment pdf link for paper.
 1.28 13-Apr-2010  jruoho Add the USENIX paper of Jonathan Lemon to SEE ALSO.
 1.27 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.26 22-Nov-2009  mbalmer remove one the to much.
 1.25 24-Oct-2009  christos simplify the example; only register the set of events to watch once since
it does not change. Also print that ATTR means changing times too.
 1.24 01-Sep-2009  wiz Make HTML-ready.
 1.23 01-Sep-2009  elad Add useful example program from

http://mail-index.netbsd.org/tech-kern/2009/09/01/msg006020.html
 1.22 12-Mar-2009  wiz Use comments instead of .ig (requested by joerg).
Sort errors while here.
 1.21 25-Feb-2009  ad Remove pointless AUTHORS sections. The names are in the source and CVS
history along with everyone else who has contributed.
 1.20 13-Oct-2006  wiz branches: 1.20.28;
Make HTML-output safe.
 1.19 09-Dec-2003  augustss Reference kfilter_register(9) rather than the non-existent kfilter_register(2).
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 16-Feb-2003  tron After "sys/event.h" was fixed "sys/types.h" doesn't need to be included
manually any more.
 1.16 04-Feb-2003  jdolecek update copyright dates and .Dd
 1.15 04-Feb-2003  jdolecek Introduce EVFILT_TIMER, which allows a process to establish an
arbitrary number of timers, both oneshot and periodic.

from FreeBSD
 1.14 19-Jan-2003  jdolecek g/c the NEXTRELEASE comment tag now that the next version number is decided
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 04-Nov-2002  jdolecek struct kevent's udata is actually intptr_t
 1.11 23-Oct-2002  jdolecek update HISTORY - kqueue branch was merged
bump date
 1.10 23-Oct-2002  jdolecek 'data' field of struct kevent is actually int64_t nowadays
 1.9 13-Oct-2002  jdolecek branches: 1.9.2;
no more BUGS; EVFILT_{VNODE,READ} is supported also for other filesystems
than FFS
 1.8 01-Oct-2002  wiz deprecated, not depreciated.
 1.7 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.6 25-Sep-2002  wiz Drop trailing whitespace, and some mdoc fixes and improvements.
 1.5 24-Sep-2002  jdolecek add missing comma
 1.4 24-Sep-2002  jdolecek 'data' contains amount of space remaining in the write buffer also
for ttys
 1.3 22-Sep-2002  jdolecek add kqueue(2)/kevent(2) manpage to mainline, to reduce difference between
the kqueue branch and -current and thus make testing easier

change HISTORY to clearly state this interface is only available with
experimental kernel branch
add Jason Thorpe and me to AUTHORS
update .Dd
 1.2 10-Jul-2001  lukem move to kqueue branch for now
 1.1 28-Jun-2001  lukem branches: 1.1.1;
Initial revision
 1.1.1.1 28-Jun-2001  lukem branches: 1.1.1.1.2;
freebsd kqueue implementation
 1.1.1.1.2.3 07-Jun-2002  jdolecek kevent(2): nchanges and nevents changed to size_t
 1.1.1.1.2.2 18-Mar-2002  jdolecek credit Luke in HISTORY section
 1.1.1.1.2.1 10-Jul-2001  lukem document differences in netbsd implementation:
* we don't have rfork or AIO, so don't talk about it
* filter, flags and fflags are now uint32_t
* document KFILTER_BYFILTER and KFILTER_BYNAME ioctls
* expand filter description
 1.9.2.3 11-Nov-2002  nathanw Catch up to -current
 1.9.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.9.2.1 13-Oct-2002  nathanw file kqueue.2 was added on branch nathanw_sa on 2002-10-18 02:16:58 +0000
 1.20.28.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.31.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.31.2.1 17-Apr-2012  yamt sync with head
 1.32.8.1 24-Nov-2012  jdc Pull up revisions:
src/sys/kern/kern_event.c revision 1.79
src/sys/kern/kern_descrip.c revision 1.219
src/lib/libc/sys/kqueue.2 revision 1.33
src/tests/lib/libc/sys/t_kevent.c revision 1.2-1.5
(requested by christos in ticket #716).

- initialize kn_id
- in close, invalidate f_data and f_type early to prevent accidental re-use
- add a DIAGNOSTIC for when we use unsupported fd's and a KASSERT for f_event
being NULL.

Return EOPNOTSUPP for fnullop_kqfilter to prevent registration of unsupported
fds. XXX: We should really fix the fd's to be supported in the future.
Unsupported fd's have a NULL f_event, so registering crashes the kernel with
a NULL function dereference of f_event.

mention that kevent returns now EOPNOTSUPP.

Move the references to PRs from code comments to the test description. Once
ATF has the ability to output the metadata in the HTML reports, it should be
easy to traverse between releng and gnats -reports via links.

Add a (skipped for now) test case for PR 46463

adapt to new reality

Add a test for adding an event to an unsupported fd.
 1.32.6.1 25-Feb-2013  tls resync with head
 1.32.2.1 24-Nov-2012  jdc Pull up revisions:
src/sys/kern/kern_event.c revision 1.79
src/sys/kern/kern_descrip.c revision 1.219
src/lib/libc/sys/kqueue.2 revision 1.33
src/tests/lib/libc/sys/t_kevent.c revision 1.2-1.5
(requested by christos in ticket #716).

- initialize kn_id
- in close, invalidate f_data and f_type early to prevent accidental re-use
- add a DIAGNOSTIC for when we use unsupported fd's and a KASSERT for f_event
being NULL.

Return EOPNOTSUPP for fnullop_kqfilter to prevent registration of unsupported
fds. XXX: We should really fix the fd's to be supported in the future.
Unsupported fd's have a NULL f_event, so registering crashes the kernel with
a NULL function dereference of f_event.

mention that kevent returns now EOPNOTSUPP.

Move the references to PRs from code comments to the test description. Once
ATF has the ability to output the metadata in the HTML reports, it should be
easy to traverse between releng and gnats -reports via links.

Add a (skipped for now) test case for PR 46463

adapt to new reality

Add a test for adding an event to an unsupported fd.
 1.33.8.1 14-Apr-2015  snj Pull up following revision(s) (requested by christos in ticket #677):
lib/libc/sys/kqueue.2: revision 1.34
sys/kern/kern_event.c: revision 1.83
put the exit code of the process in data, like FreeBSD does.
--
say that we put the exit code in data.
 1.35.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.35.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.36.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.47.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.47.4.1 10-Jun-2019  christos Sync with HEAD
 1.22 25-Oct-2017  abhinav Add fktrace to the NAME section
 1.21 20-Mar-2016  wiz Sort errors. Improve markup.
 1.20 19-Mar-2016  dholland Sync documentation of struct ktr_header with reality:
- there is a ktr_version field
- the ordering of ktr_type and ktr_version is byte-order dependent
- ktr_time is now a timespec, not a timeval
- there's now a ktr_lid field
- there is no such thing as a ktr_buf field and it's certainly not
a caddr_t.

XXX: I would appreciate it if someone who knows how this stuff works
XXX: could review this file in case it's still lying in some more
XXX: subtle way.
 1.19 19-Mar-2016  dholland Update documented prerequisite includes. PR 50633 and PR 50634.

Remove sys/uio.h, and swap sys/param.h for sys/types.h as sys/ktrace.h
depends on MAXCOMLEN.

Bump date; first time since 1993.
 1.18 11-Nov-2014  njoly Do not hardcode values for ENAMETOOLONG, use symblic constants.
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.12 24-Sep-2002  jdolecek also need <sys/uio.h>
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.9 16-Sep-2001  wiz Boring whitespace fixes.
 1.8 18-Mar-2001  pooka make prototypes match reality found in <sys/ktrace.h>
 1.7 02-Dec-1999  kleink branches: 1.7.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.6 22-Mar-1999  garbled branches: 1.6.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.4 27-Jun-1998  christos Add stub for fktrace(2)
 1.3 27-Jun-1998  nathanw Document KTRFAC_EMUL.
 1.2 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.1 27-Feb-1995  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.6.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.7.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.7.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.7.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.10 30-Apr-2008  martin branches: 1.10.8;
Convert TNF licenses to new 2 clause variant
 1.9 13-May-2004  wiz branches: 1.9.24;
\- is a minus, not -.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.6 02-Oct-2002  wiz corrseponding -> corresponding, filesystem -> file system.
 1.5 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.4 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.2 16-Sep-2001  wiz Boring whitespace fixes.
 1.1 24-May-2000  perseant branches: 1.1.6;
Add man pages for LFS syscalls
 1.1.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.1.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.1.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.9.24.1 18-May-2008  yamt sync with head.
 1.10.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.10.8.1 30-Apr-2008  martin file lfs_bmapv.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.12 14-May-2017  wiz file system police.
 1.11 30-Apr-2008  martin branches: 1.11.8; 1.11.54;
Convert TNF licenses to new 2 clause variant
 1.10 13-May-2004  wiz branches: 1.10.24;
\- is a minus, not -.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.6 10-Jul-2002  wiz Remove Xr to ourselves from SEE ALSO.
 1.5 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.3 16-Sep-2001  wiz Boring whitespace fixes.
 1.2 09-Oct-2000  toshii branches: 1.2.2;
lfs_bmapv -> lfs_markv
 1.1 24-May-2000  perseant Add man pages for LFS syscalls
 1.2.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.4 01-Aug-2002  nathanw Catch up to -current.
 1.2.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.2.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.2.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.10.24.1 18-May-2008  yamt sync with head.
 1.11.54.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.11.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.11.8.1 30-Apr-2008  martin file lfs_markv.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.9 14-May-2017  wiz file system police.
 1.8 30-Apr-2008  martin branches: 1.8.8; 1.8.54;
Convert TNF licenses to new 2 clause variant
 1.7 13-May-2004  wiz branches: 1.7.24;
\- is a minus, not -.
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.2 16-Sep-2001  wiz Boring whitespace fixes.
 1.1 24-May-2000  perseant branches: 1.1.6;
Add man pages for LFS syscalls
 1.1.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.1.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.1.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.7.24.1 18-May-2008  yamt sync with head.
 1.8.54.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.8.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.8.8.1 30-Apr-2008  martin file lfs_segclean.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.9 14-May-2017  wiz file system police.
 1.8 30-Apr-2008  martin branches: 1.8.8; 1.8.54;
Convert TNF licenses to new 2 clause variant
 1.7 13-May-2004  wiz branches: 1.7.24;
\- is a minus, not -.
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.2 16-Sep-2001  wiz Boring whitespace fixes.
 1.1 24-May-2000  perseant branches: 1.1.6;
Add man pages for LFS syscalls
 1.1.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.1.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.1.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.7.24.1 18-May-2008  yamt sync with head.
 1.8.54.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.8.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.8.8.1 30-Apr-2008  martin file lfs_segwait.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.34 20-Jul-2024  uwe link(2): links to directories are refused at the VFS level

Drop the condition that "the caller is the super-user and the file
system ... supports linking to directories."

From nabijaczleweli.
 1.33 01-Sep-2019  sevan branches: 1.33.10;
Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.32 28-Jul-2013  njoly branches: 1.32.26; 1.32.28;
Add linkat(2) specific errors.
 1.31 14-Jul-2013  njoly Switch a few remaining system/pathname configuration variables from
"Dv {xxx}" to "Brq Dv xxx".
 1.30 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.29 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
 1.28 01-Dec-2012  wiz Remove trailing whitespace.
 1.27 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.26 08-Aug-2011  wiz branches: 1.26.2; 1.26.8;
Sort sections. Remove trailing whitespace. Sort errors.
New sentence, new line.
 1.25 08-Aug-2011  manu First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
 1.24 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.23 23-Mar-2009  joerg Remove/convert physical markup.
 1.22 13-May-2004  wiz branches: 1.22.32; 1.22.36;
\- is a minus, not -.
 1.21 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.20 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 17-Jun-2000  hubertf branches: 1.14.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.13 02-Dec-1999  kleink branches: 1.13.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 22-Mar-1999  garbled branches: 1.12.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.10 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.9 27-Mar-1997  mikel oops, missed one (from PR 3397)
 1.8 27-Mar-1997  mikel POSIX.1 specifies that a failed link() to a directory must return EPERM,
and EMLINK was not documented; from Klaus Klein in PR standards/3397.
Also documented EOPNOTSUPP for filesystems that don't support hard links.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.14.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.14.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.14.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.14.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.36.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.22.32.1 17-Sep-2011  bouyer Pull up following revision(s) (requested by manu in ticket #1658):
sys/rump/include/rump/rump_syscalls.h: revision 1.52 via patch
sys/kern/init_sysent.c: revision 1.257 via patch
sys/rump/include/rump/rumpvnode_if.h: revision 1.12 via patch
lib/libc/sys/Makefile.inc: revision 1.208 via patch
sys/sys/syscallargs.h: revision 1.227 via patch
sys/kern/kern_exec.c: revision 1.317 via patch
sys/rump/librump/rumpkern/rump_syscalls.c: revision 1.74 via patch
include/limits.h: revision 1.30 via patch
sys/kern/syscalls.master: revision 1.251 via patch
sys/sys/vnode_if.h: revision 1.83 via patch
sys/sys/fcntl.h: revision 1.40 via patch
sys/sys/fcntl.h: revision 1.41 via patch
sys/kern/vfs_syscalls.c: revision 1.433 via patch
sys/rump/librump/rumpvfs/rumpvnode_if.c: revision 1.11 via patch
sys/kern/syscalls.c: revision 1.248 via patch
sys/sys/syscall.h: revision 1.244 via patch
lib/libc/sys/link.2: revision 1.25 via patch
include/unistd.h: revision 1.127 via patch
distrib/sets/lists/comp/mi: revision 1.1659 via patch
sys/sys/stat.h: revision 1.61 via patch
First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.
Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
regen
improve comment about AT_* defines: they are not only used by linkat(2)
Add macros to hide OpenGroup extened API set 2 from GNU configure. This
is a temporary workaround until the implementation is completed.
 1.26.8.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.8.2 25-Feb-2013  tls resync with head
 1.26.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.26.2.2 23-Jan-2013  yamt sync with head
 1.26.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.32.28.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.32.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.33.10.1 02-Aug-2025  perseant Sync with HEAD
 1.16 13-May-2004  wiz \- is a minus, not -.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 16-Feb-1996  phil Change to fit reality. Backlog is limited to 128, not 5.
(sys/socket.h: SOMAXCONN)
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.4 25-Nov-1993  jtc Misc manpage fixes.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.25 02-Sep-2019  sevan seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
 1.24 05-Apr-2010  wiz branches: 1.24.46; 1.24.48;
Sort ERRORS section.
 1.23 03-Apr-2010  jruoho Add a history section. From OpenBSD.
 1.22 13-May-2004  wiz \- is a minus, not -.
 1.21 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.20 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.17 10-Jul-2002  wiz Markup improvement.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 02-Dec-1999  kleink branches: 1.13.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 22-Mar-1999  garbled branches: 1.12.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.10 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.9 14-Jul-1997  kleink branches: 1.9.2;
Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.8 21-Jun-1997  lukem fix a couple of typos
 1.7 04-Apr-1997  kleink Documented EINVAL result for invalid resulting offsets.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 10-Jan-1994  jtc Fix spelling errors.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.2.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.13.6.4 01-Aug-2002  nathanw Catch up to -current.
 1.13.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.24.48.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.24.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.10 23-Nov-2007  uebayasi branches: 1.10.30;
KNF; no variable name in function prototype.
 1.9 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.8 07-Aug-2003  agc branches: 1.8.22;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.7 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.6 14-Oct-1998  kleink Need internal names for ftruncate(), lseek(), mmap(), pread() and pwrite().
 1.5 13-Jul-1997  christos Fix RCSID's
 1.4 20-Dec-1996  cgd pull in unistd.h for prototypes
 1.3 27-Feb-1995  cgd clean up merge, fix Id's
 1.2 06-May-1994  cgd branches: 1.2.4;
clean
 1.1 02-Apr-1994  cgd branches: 1.1.1;
stubs, to get the padding right. so nasty it's almost unbelievable.
also, kill "special lseek" bogon.
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.2.4.1 18-Apr-1995  jtc #include "namespace.h"
 1.8.22.1 09-Jan-2008  matt sync with HEAD
 1.10.30.1 17-Apr-2012  yamt sync with head
 1.29 03-Feb-2017  abhinav Add posix_madvise(2) in the NAME section.
 1.28 19-Jul-2014  dholland branches: 1.28.6; 1.28.10;
fix usage
 1.27 29-Mar-2011  jruoho branches: 1.27.10; 1.27.20;
Improve -width.
 1.26 03-Jun-2009  wiz New sentence, new line.
 1.25 01-Jun-2009  yamt don't describe internal details.
 1.24 22-Apr-2008  rmind branches: 1.24.8;
Add posix_madvise(2) and appropriate definitions in sys/mman.h header.
This interface is identical to madvise(2), however, is defined by POSIX.
Partially sync madvise(2) man page with FreeBSD.

Reviewed by <mrg>.
 1.23 13-Oct-2006  wiz branches: 1.23.16;
No Xr to ourselves.
 1.22 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.21 13-May-2004  wiz \- is a minus, not -.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.17 11-Aug-2002  yamt bring in RETURN VALUES from openbsd.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 05-Oct-2000  ad branches: 1.14.2;
insure -> ensure
 1.13 26-Jun-2000  kleink Finally nuke <sys/types.h> from SYNOPSIS.
 1.12 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 24-Aug-1999  mrg branches: 1.11.4;
add a note that these requests were ignored in pre-1.5
 1.10 16-Aug-1999  enami Copy the definition of MADV_FREE from sys/mman.h.
 1.9 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.8 16-Oct-1997  christos caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.7 27-Dec-1995  jtc Fix grammar error pointed out by Peter Seebach in PR#1846
 1.6 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 15-Dec-1993  jtc Add explicit return types and needed header files to SYNOPSIS section.
 1.3 05-Aug-1993  jtc update manpage to -mandoc macros
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.2.4 13-Aug-2002  nathanw Catch up to -current.
 1.14.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.14.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.14.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.23.16.1 18-May-2008  yamt sync with head.
 1.24.8.2 22-Apr-2008  rmind Add posix_madvise(2) and appropriate definitions in sys/mman.h header.
This interface is identical to madvise(2), however, is defined by POSIX.
Partially sync madvise(2) man page with FreeBSD.

Reviewed by <mrg>.
 1.24.8.1 22-Apr-2008  rmind file madvise.2 was added on branch christos-time_t on 2008-04-22 10:42:17 +0000
 1.27.20.1 10-Aug-2014  tls Rebase.
 1.27.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.10.1 21-Apr-2017  bouyer Sync with HEAD
 1.28.6.1 20-Mar-2017  pgoyette Sync with HEAD
 1.28 20-Jan-2024  christos Catch up with all the lint warnings since exit on warning was disabled.
Disable 'missing header declaration' and 'nested extern' warnings for now.
 1.27 16-May-2020  christos Add ACL support for FFS. From FreeBSD.
 1.26 03-Apr-2016  christos add idtype.h to mklintstub and say who generates it.
 1.25 12-Feb-2012  martin Add missing <sys/spawn.h> include
 1.24 01-Feb-2012  dholland Change the syscall API for quotas over to the new non-proplib one.

- struct vfs_quotactl_args -> struct quotactl_args
- add sys/stdint.h to sys/quotactl.h for clean userland build
- install sys/quotactl.h in /usr/include
- update set lists for same
- add new marshalling code in libquota
- add new unmarshalling code in vfs_syscalls.c
- discard proplib interpreter code in vfs_quotactl.c
- add dispatching code for the 14 quotactl ops in vfs_quotactl.c
- mark the proplib quotactl syscall obsolete
- add a new syscall number for the new quotactl syscall
- change the name of the syscall to __quotactl()
- remove the decl of the old quotactl from quota/quotaprop.h
- add a decl of the new quotactl to sys/quotactl.h
- update the libc build
- update ktruss
- remove proplib marshalling code from libquota
- update copy of syscall table in gdb ppc sources
- hack rumphijack to accomodate new quotactl name (as I recall,
pooka wanted such a name change to simplify something, but I
don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.
 1.23 05-Aug-2008  lukem branches: 1.23.2; 1.23.6;
Revert previous addition of '-e sedcmd'. Still retain the usage improvements.
 1.22 05-Aug-2008  lukem Add '-e sedcmd' to makelintstub, to translate filename to syscall name.
Improve usage, etc.

Invoke makelintstub with -e 's/^tmp_//' when building LintSysNormal.c

Fixes build problem that matt@ highlighted to me.
 1.21 15-Jan-2008  rmind branches: 1.21.6;
Implementation of processor-sets, affinity and POSIX real-time extensions.
Add schedctl(8) - a program to control scheduling of processes and threads.

Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;

Proposed on: <tech-kern>. Reviewed by: <ad>.
 1.20 13-Nov-2007  he We now need <sys/lwpctl.h> included in order to lint LintSysNormal.c.
 1.19 09-Oct-2007  rmind Add cancellation stubs in libpthread for POSIX messages queues and
asynchronous I/O.

OK by <ad>.
 1.18 09-Feb-2007  ad branches: 1.18.4;
Sync with kernel changes introduced by merging the newlock2 branch.
 1.17 18-Jun-2006  christos Modernize:
getopt -> getopts
`` -> $()
YES/NO -> true/false
[ x$f = x ] -> [ -z $f ]
test -> [
errors to stderr
 1.16 29-Jan-2004  tsarna uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in
PR#23470, with minor updates by me. This is only the syscall support
from that PR, for now.

Changes: port over fix from FreeBSD for multicast address generation.
Changed bcopy to memcpy. For now, #ifdef notyet the portions of
kern_uuid.c that are meant to be used by (currently nonexistent) other
things in the kernel. Added syscall to COMPAT_FREEBSD as well, though
that's currently not useful, as any program new enough to use this call
also uses other syscalls we don't (yet) emulate.
 1.15 30-Sep-2003  christos Pass -D_LIBC
 1.14 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 11-Nov-2002  thorpej Make sure there is a newline at the end of CPP input.
 1.11 23-Oct-2002  jdolecek make support for kqueue(2) and kevent(2) unconditional, the kqueue branch
was merged
 1.10 12-Oct-2002  jdolecek if WITH_KQUEUE is defined and <sys/event.h> exists in DESTDIR, compile
support for kqueue(2) and kevent(2) in

this is temporary measure to ease testing of kqueue branch; the support
will be made unconditional once kqueue branch would be merged
 1.9 14-Sep-2002  thorpej Fix some problems using makelintstub as a cross-tool:
* Require that the path to the C preprocessor be passed in the CPP
environemnt variable, and use it rather than hard-coding "cpp".
Provide the target's preprocessor when invoking makelintstub.
* Fix some quoting issues that turned up with Solaris 8's XPG4 sh and sed.
* Don't use echo -n. Instead, don't bother making the output pretty; the
whitespace isn't supposed to be syntactically significant anyhow.
 1.8 13-Nov-2001  tv branches: 1.8.2;
Make this match the new .S extension of syscalls.
 1.7 14-Jun-2000  cgd branches: 1.7.4; 1.7.6;
sweep of my licenses (userland files w/o only my copyright) for
consistency. (no functional changes)
 1.6 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.5 03-Jul-1998  mycroft branches: 1.5.8;
Further redux.
 1.4 03-Jul-1998  mycroft Make this a bit less fork-happy.
 1.3 01-Mar-1998  fvdl Make this output one more include file, needed after the Lite2 changes.
 1.2 05-Nov-1997  thorpej Instead of creating a .ln for each syscall stub, create one (big) .ln
per class of syscall stubs. This is much more efficient (though it's still
pretty inefficient).

This also fixes a problem with syscall.h and DESTDIR which was pretty
well buried in the old implementation.

From Chris Demetriou <cgd@pa.dec.com>.
 1.1 22-Dec-1996  cgd branches: 1.1.2;
a script to build C source code stubs to be fed to lint(1) from the data
in <sys/syscall.h>.
 1.1.2.1 05-Nov-1997  thorpej Update from trunk: fix lint syscall stub generation.
 1.5.8.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.6.1 10-Jul-2001  lukem pull in <sys/event.h>
 1.7.4.5 11-Nov-2002  nathanw Catch up to -current
 1.7.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.7.4.3 17-Sep-2002  nathanw Catch up to -current.
 1.7.4.2 04-May-2002  thorpej Pull in <sys/sa.h>.
 1.7.4.1 14-Nov-2001  nathanw Catch up to -current.
 1.8.2.1 11-Nov-2002  he Pull up revision 1.9 (requested by thorpej in ticket #803):
Fix some problems using makelintstub as a cross-tool:
o Require that the path to the C preprocessor be passed
in the CPP environment variable, and use it rather than
hard-coding "cpp". Provide the target's preprocessor
when invoking makelintstub.
o Fix some quoting issues found with Solaris 8's XPG4 sh
and sed.
o Do not use "echo -n". The resulting whitespace is not
supposed to be syntactically significant anyway.
 1.18.4.3 23-Mar-2008  matt sync with HEAD
 1.18.4.2 09-Jan-2008  matt sync with HEAD
 1.18.4.1 06-Nov-2007  matt sync with HEAD
 1.21.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.23.6.2 05-Aug-2008  lukem Revert previous addition of '-e sedcmd'. Still retain the usage improvements.
 1.23.6.1 05-Aug-2008  lukem file makelintstub was added on branch christos-time_t on 2008-08-05 02:08:14 +0000
 1.23.2.1 17-Apr-2012  yamt sync with head
 1.1 10-Jul-2023  christos Add memfd_create(2) from GSoC 2023 by Theodore Preduta
 1.21 26-Jul-2022  uwe mincore(2) - use .Rv -std
 1.20 25-Jul-2022  riastradh mincore(2): Clarify units of len argument: bytes, not pages.

Minor tidying while here:

- Use .Fa, not .Ar, for function arguments.
- Reduce verbiage of opening sentence.
 1.19 13-May-2004  wiz \- is a minus, not -.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.14 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.13 16-Sep-2001  wiz Boring whitespace fixes.
 1.12 26-Jun-2000  kleink branches: 1.12.2;
Finally nuke <sys/types.h> from SYNOPSIS.
 1.11 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 07-Jun-1999  thorpej branches: 1.10.4;
Fill out the mincore(2) manual page a little; define the NetBSD call
to be like the Solaris call.
 1.9 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.8 16-Oct-1997  christos caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.7 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.6 24-Jun-1995  cgd add mlock xrefs as suggested by davide@cs.cmu.edu
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 15-Dec-1993  jtc Add explicit return types and needed header files to SYNOPSIS section.
 1.3 05-Aug-1993  jtc update manpage to -mandoc macros
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.12.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.12.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.12.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.21 08-Sep-2019  sevan Extend history
 1.20 05-Aug-2014  riastradh branches: 1.20.24;
Rework minherit(2) man page into a table.

XXX Do we not guarantee page-granularity inheritance? Cursory glance
at uvm suggests we do -- can we nix the caveats about regions vs
pages?
 1.19 18-Jul-2014  christos Document MAP_INHERIT_ZERO.
 1.18 13-Oct-2006  wiz branches: 1.18.48; 1.18.60;
No Xr to ourselves. English improvement.
 1.17 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.16 19-Nov-2003  wiz Use Rv for return values section; bump date.
 1.15 19-Nov-2003  pooka document RETURN VALUES
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.9 16-Sep-2001  wiz Boring whitespace fixes.
 1.8 04-Aug-2000  wiz branches: 1.8.2;
Whitespace fix, noted by John Hawkinson.
 1.7 01-Aug-2000  wiz Rename VM_INHERIT_* to MAP_INHERIT_* and move them to sys/sys/mman.h as
discussed on tech-kern.
Retire sys/uvm/uvm_inherit.h, update man page for minherit(2).
 1.6 26-Jun-2000  kleink Finally nuke <sys/types.h> from SYNOPSIS.
 1.5 25-Jun-2000  wiz punctuation fix (. -> ,)
 1.4 25-Jun-2000  sommerfeld Explain what this function actually does
 1.3 02-Dec-1999  kleink branches: 1.3.4;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.2 16-Oct-1997  christos branches: 1.2.8;
caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.1 08-Sep-1997  chuck import minherit from OpenBSD
 1.2.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.4.2 05-Aug-2000  wiz Apply patch (approved by jhawk and thorpej):

Rename VM_INHERIT_* to MAP_INHERIT_* and move them to sys/sys/mman.h as
discussed on tech-kern.
Retire sys/vm/vm_inherit.h, update man page for minherit(2).

The patch includes approximately the following diffs (approximately
since -current already used uvm/uvm_inherit.h):
minherit.2: 1.4 -> 1.8
mman.h: 1.26 -> 1.27
powerpc/include/db_machdep.h: 1.7 -> 1.8
pc532/include/db_machdep.h: 1.12 -> 1.13
 1.3.4.1 25-Jun-2000  sommerfeld Pull up minherit.2 1.4. Approved by thorpej.
Improve description of what minherit actually does.
 1.8.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.8.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.8.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.18.60.1 10-Aug-2014  tls Rebase.
 1.18.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.24.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.33 12-Sep-2025  jschauma Note that mkdir(2) may fail with EMLINK if the creation would lead to
too many hardlinks to the parent directory (i.e., too many subdirs).
 1.32 05-Feb-2020  wiz Remove trailing whitespace.
 1.31 04-Feb-2020  christos Mention that we don't honor the other mode bits.
 1.30 01-Sep-2019  sevan Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.29 15-Oct-2013  njoly branches: 1.29.26; 1.29.28;
Adjust needed includes for fchmodat/mkdirat/mkfifoat/mknodat/fstatat
syscalls.
 1.28 28-Jul-2013  njoly Add mkdirat(2) specific errors.
 1.27 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.26 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.25 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.24 31-May-2010  njoly branches: 1.24.6; 1.24.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.23 27-Dec-2005  chs change errors returned for various operations on "/" to conform to SUSv3.
as discussed on tech-kern some time back.
 1.22 17-Sep-2005  christos Document that mkdir("/", x) returns EISDIR. According to POSIX this is not
an allowed error, but we return EIO and EDQUOT also which are not in POSIX
either.
 1.21 13-May-2004  wiz \- is a minus, not -.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.17 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.16 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 02-Dec-1999  kleink branches: 1.13.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 22-Mar-1999  garbled branches: 1.12.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.10 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.9 12-Nov-1996  lukem fix the the typos
 1.8 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.7 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.6 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.5 15-Dec-1993  jtc Must #include <sys/types.h> to use these functions.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.13.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.13.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.24.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.12.2 25-Feb-2013  tls resync with head
 1.24.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.24.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.24.6.2 23-Jan-2013  yamt sync with head
 1.24.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.29.28.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.29.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.27 15-Oct-2013  njoly Adjust needed includes for fchmodat/mkdirat/mkfifoat/mknodat/fstatat
syscalls.
 1.26 30-Jul-2013  njoly Add mkfifoat(2) specific errors.
 1.25 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.24 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.23 01-Dec-2012  wiz Bump date, really.
 1.22 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.21 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.20 31-May-2010  njoly branches: 1.20.6; 1.20.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.19 13-May-2004  wiz \- is a minus, not -.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.14 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 02-Dec-1999  kleink branches: 1.11.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 29-Aug-1998  lukem branches: 1.10.6;
first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.8 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.7 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.6 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.5 31-Jan-1994  jtc ENOPSUPP -> EOPNOPSUPP
 1.4 15-Dec-1993  jtc Must #include <sys/types.h> to use these functions.
 1.3 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.11.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.11.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.20.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.12.2 25-Feb-2013  tls resync with head
 1.20.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.20.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.20.6.2 23-Jan-2013  yamt sync with head
 1.20.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.31 20-Jun-2019  wiz fifo -> FIFO. Sort errors.
 1.30 20-Jun-2019  kamil Add mkfifo{,at}(2) mode in mknod{,at}(2) as requested by POSIX

mknod with mode & S_IFIFO and dev=0 shall behave like mkfifo.

Update the documentation to reflect this state.

Add ATF tests.

This is an in-kernel implementation as typically user-space programs use
mkfifo(2) directly, however whenever there is need to bypass libc (like in
valgrind) then portable POSIX software calls the mknod syscall.

Noted on tech-kern@ by Greg Troxel.
 1.29 20-Nov-2017  uwe branches: 1.29.4;
.Xr makedev 3
 1.28 15-Oct-2013  njoly Adjust needed includes for fchmodat/mkdirat/mkfifoat/mknodat/fstatat
syscalls.
 1.27 30-Jul-2013  njoly Add mknodat(2) specific errors.
 1.26 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.25 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.24 01-Dec-2012  wiz Remove trailing whitespace.
 1.23 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.22 08-Jul-2011  wiz branches: 1.22.2; 1.22.8;
Sort error descriptions.
 1.21 03-Jul-2011  jruoho Note that mknod(2) may fail with EINVAL.
 1.20 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.19 18-Jan-2007  drochner -fix use of arguments and remove an outdated section
-Xr mkfifo(2)
(btw, SUSv3 says that the only portable use of mknod() is to create
a FIFO. This is not supported by NetBSD.)
 1.18 13-May-2004  wiz \- is a minus, not -.
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 02-Nov-1997  kleink Per XPG4.2, move mknod() prototype from <unistd.h> to <sys/stat.h>.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.4 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.8.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.8.2 25-Feb-2013  tls resync with head
 1.22.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.22.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.22.2.2 23-Jan-2013  yamt sync with head
 1.22.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.29.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 17-Oct-2013  njoly branches: 1.1.4; 1.1.8;
Change mknodat(2) device argument type from uint32_t to dev_t.
Adds needed extra PAD argument for 64bit alignment, and libc wrapper.
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 17-Oct-2013  tls file mknodat.c was added on branch tls-maxphys on 2014-08-20 00:02:16 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 17-Oct-2013  yamt file mknodat.c was added on branch yamt-pagecache on 2014-05-22 11:36:54 +0000
 1.22 08-Feb-2015  wiz It is 2015 already.
 1.21 08-Feb-2015  njoly The length argument is of an unsigned type (size_t) and cannot be
negative. Remove wrong statements in ERRORS section.
 1.20 28-Feb-2011  wiz Merge EINVAL descriptions; sort errors alphabetically; bump date.
 1.19 28-Feb-2011  dholland Improve discussion of alignment and rounding per PR 33527.
 1.18 13-May-2004  wiz branches: 1.18.46;
\- is a minus, not -.
 1.17 02-Jan-2004  jmmv Fix typo; from Aidan Kehoe in PR lib/23951.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 28-Sep-2000  is branches: 1.12.2;
Document EPERM.
 1.11 26-Jun-2000  kleink Finally nuke <sys/types.h> from SYNOPSIS.
 1.10 02-Dec-1999  kleink branches: 1.10.4;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 16-Jun-1999  thorpej branches: 1.9.4;
Note POSIX 1003.1b-1993.
 1.8 16-Jun-1999  thorpej The (incorrect) nesting behavior of mlock(2) no longer exists.
 1.7 06-Apr-1999  cgd change:
.Sh "SEE ALSO"
to:
.Sh SEE ALSO
The doc macros check for the latter (actually just for 'SEE' as the first
argument to .Sh) to set the section header SEE ALSO flag, which modifies
some behaviour (e.g. references done with .Rs/.Re).
 1.6 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.5 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.4 16-Oct-1997  christos caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.3 24-Jun-1995  cgd add mincore xref as suggested by davide@cs.cmu.edu
 1.2 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.1 07-May-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 07-May-1994  cgd new syscalls
 1.9.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.4.1 28-Sep-2000  is Pullup from -current, requested by is, approved by thorpej.
mlock.2 1.12
Document EPERM.
 1.12.2.2 22-Mar-2002  nathanw Catch up to -current.
 1.12.2.1 08-Mar-2002  nathanw Catch up to -current.
 1.18.46.1 05-Mar-2011  bouyer Sync with HEAD
 1.13 30-Apr-2008  martin branches: 1.13.8;
Convert TNF licenses to new 2 clause variant
 1.12 13-May-2004  wiz branches: 1.12.24;
\- is a minus, not -.
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.9 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.8 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 16-Sep-2001  wiz Boring whitespace fixes.
 1.6 26-Jun-2000  kleink branches: 1.6.2;
Finally nuke <sys/types.h> from SYNOPSIS.
 1.5 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.4 18-Jun-1999  thorpej branches: 1.4.4;
MCL_FUTURE is now implemented.
 1.3 16-Jun-1999  thorpej Note that MCL_FUTURE is not yet fully implented in the BUGS section.
 1.2 16-Jun-1999  thorpej Note POSIX 1003.1b-1993.
 1.1 15-Jun-1999  thorpej Add mlockall(2)/munlockall(2).
 1.4.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.6.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.6.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.6.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.12.24.1 18-May-2008  yamt sync with head.
 1.13.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.13.8.1 30-Apr-2008  martin file mlockall.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.57 13-May-2024  msaitoh s/of of/of/ in comment.
 1.56 01-Mar-2023  uwe mmap(2): minor markup tweaks
 1.55 08-Sep-2019  sevan Sort flags
 1.54 08-Sep-2019  sevan Document MAP_ANONYMOUS
 1.53 19-Jun-2019  uwe Small markup fixes.
 1.52 02-May-2018  christos branches: 1.52.2;
Explain PROT_MPROTECT better, add references to mremap(2), document the
unimplemented flags, documented the alignment pre-defined constants.
 1.51 12-Jun-2017  abhinav branches: 1.51.4;
Fix typo
Insert Pp after a list to add vertical space before the next paragraph
Remove Pp before Bl at two places
 1.50 14-May-2017  wiz Use Nx.
 1.49 06-May-2017  joerg Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.

Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.

Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.

Improve test cases to ensure correct operation of the changed
interfaces.
 1.48 27-Feb-2015  christos branches: 1.48.6;
Document SIGBUS per ToG.
 1.47 05-Jan-2012  reinoud Revert MAP_NOSYSCALLS patch.
 1.46 20-Dec-2011  wiz New sentence, new line. Bump date for previous.
 1.45 20-Dec-2011  reinoud Add a MAP_NOSYSCALLS flag to mmap. This flag prohibits executing of system
calls from the mapped region. This can be used for emulation perposed or for
extra security in the case of generated code.

Its implemented by adding mapping-attributes to each uvm_map_entry. These can
then be queried when needed.

Currently the MAP_NOSYSCALLS is only implemented for x86 but other
architectures are easy to adapt; see the sys/arch/x86/x86/syscall.c patch.
Port maintainers are encouraged to add them for their processor ports too.
When this feature is not yet implemented for an architecture the
MAP_NOSYSCALLS is simply ignored with virtually no cpu cost..
 1.44 15-Oct-2011  rmind branches: 1.44.2;
Amend previous: just leave the part that mmap() was designed for 4.2BSD
and do not mention 4.4BSD until it becomes clear when exactly the interface
was shipped.
 1.43 15-Oct-2011  rmind Mention that mmap(2) was designed for 4.2BSD, but really appeared in 4.4BSD.
 1.42 31-Mar-2011  jruoho Offset indent.
 1.41 27-Feb-2009  wiz New sentence, new line. Use more markup.
 1.40 27-Feb-2009  pooka Remove mentions of MAP_COPY, it's not available and trying to use it
will result in compile failure.
 1.39 18-Jul-2007  wiz branches: 1.39.16; 1.39.22;
Uppercase logical OR operator.
 1.38 25-Mar-2006  rtr Remove "len was less than zero" from the list of reasons that the function
will fail with EINVAL since the len param is size_t and couldn't possibly
be "less than zero".

Resolves pr32516
 1.37 04-Oct-2004  perry Note that MAP_ANON memory is zero filled.
 1.36 24-Mar-2004  wiz Increase width in tables so this displays more nicely.
 1.35 07-Oct-2003  thorpej Add a MAP_WIRED flag to mmap(2), which causes the new mapping to be
wired as if by mlock(2).
 1.34 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.33 04-Jul-2003  wiz Bump date for last.
 1.32 23-Jun-2003  christos PR/21948: Todd Vierling: Implement MAP_TRYFIXED for linux emulation.
 1.31 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.30 10-Apr-2003  wiz Add a comma after e.g.
 1.29 10-Apr-2003  atatat Document the new MAP_ALIGNED() flag/macro, be more specific about what
values for fd are acceptable when using MAP_ANON, and add a short
paragraph describing (in short) the relationship between mmap()
allocations and the break.

Addresses PR kern/7935 and PR lib/20803.
 1.28 31-Mar-2003  perry enforcable->enforceable (Igor Sobrado, PR misc/19731)
 1.27 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.26 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.25 08-Feb-2002  ross branches: 1.25.2;
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.24 23-Oct-2001  mycroft Should have done this years ago...
Add a warning about the separability of the PROT_* flags.
 1.23 16-Sep-2001  wiz Boring whitespace fixes.
 1.22 26-Jun-2000  kleink branches: 1.22.2;
Finally nuke <sys/types.h> from SYNOPSIS.
 1.21 28-Mar-2000  kleink In mmap(), bail out with EOVERFLOW when mapping a regular file and the file
offset plus mapping length cannot be represented in an off_t.
 1.20 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.19 06-Apr-1999  cgd branches: 1.19.4;
change:
.Sh "SEE ALSO"
to:
.Sh SEE ALSO
The doc macros check for the latter (actually just for 'SEE' as the first
argument to .Sh) to set the section header SEE ALSO flag, which modifies
some behaviour (e.g. references done with .Rs/.Re).
 1.18 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.17 09-Mar-1999  ross More missing .El's.
 1.16 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.15 03-Jun-1998  kleink Use MAP_FAILED in the return values description.
 1.14 28-Mar-1998  kleink Per XPG, if the file descriptor argument to mmap() refers to a file whose
type is not supported (neither VREG nor VCHR, or not a vnode at all), fail
with ENODEV instead of EINVAL.
 1.13 10-Feb-1998  mrg update MAP_COPY documentation, noting that it is currently implemented as MAP_PRIVATE.
 1.12 02-Feb-1998  perry merge lite-2
 1.11 10-Jan-1998  kleink Document PROT_NONE.
 1.10 15-Dec-1997  mrg note that MAP_SHARED or MAP_PRIVATE must be specified.
 1.9 16-Oct-1997  christos caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.8 15-Jul-1997  mikel xref getpagesize(3) not getpagesize(2), sort xrefs
 1.7 12-Jul-1997  perry nuke reference to nonexistant MAP_WRITE flag, per Brian Grayson, pr-3698
 1.6 29-May-1997  cgd Fix broken uses of Dd. Both the mdoc and mdoc.samples pages agree:
.Dd is supposed to be invoked like:
.Dd month day, year
e.g. ".Dd January 25, 1989", rather than:
.Dd "month day, year"
which is what these pages did.
 1.5 24-Jun-1995  cgd add mlock xrefs as suggested by davide@cs.cmu.edu
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 31-Jul-1994  mycroft Fix for MAP_FILE changes.
 1.2 01-Aug-1993  mycroft branches: 1.2.2;
Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.2.2.1 01-Aug-1994  cgd from trunk.
 1.19.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.22.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.22.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.22.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.22.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.22.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.25.2.1 17-Aug-2003  tron Pull up revision 1.32 (requested by tv in ticket #1420):
PR/21948: Todd Vierling: Implement MAP_TRYFIXED for linux emulation.
 1.39.22.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.39.16.2 18-Jul-2007  wiz Uppercase logical OR operator.
 1.39.16.1 18-Jul-2007  wiz file mmap.2 was added on branch matt-mips64 on 2007-07-18 23:34:24 +0000
 1.44.2.1 17-Apr-2012  yamt sync with head
 1.48.6.2 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.48.6.1 11-May-2017  pgoyette Sync with HEAD
 1.51.4.1 21-May-2018  pgoyette Sync with HEAD
 1.52.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.14 23-Nov-2007  uebayasi branches: 1.14.30;
KNF; no variable name in function prototype.
 1.13 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.12 07-Aug-2003  agc branches: 1.12.22;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.10 15-Nov-1998  christos delint
 1.9 14-Oct-1998  kleink Need internal names for ftruncate(), lseek(), mmap(), pread() and pwrite().
 1.8 16-Oct-1997  christos caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.7 13-Jul-1997  christos Fix RCSID's
 1.6 23-Dec-1996  cgd Fix quad_t __syscall() return goofs. Now these should work on big-endian
systems, too.
 1.5 20-Dec-1996  cgd pull in unistd.h for prototypes
 1.4 27-Feb-1995  cgd clean up merge, fix Id's
 1.3 19-Oct-1994  cgd branches: 1.3.2;
cast
 1.2 06-May-1994  cgd clean
 1.1 02-Apr-1994  cgd branches: 1.1.1;
stubs, to get the padding right. so nasty it's almost unbelievable.
also, kill "special lseek" bogon.
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.3.2.1 18-Apr-1995  jtc #include "namespace.h"
 1.12.22.1 09-Jan-2008  matt sync with HEAD
 1.14.30.1 17-Apr-2012  yamt sync with head
 1.19 26-Apr-2020  pgoyette Document ENOSYS return from MODCTL_EXIST.

Remove EMLINK since it is no longer returned.
 1.18 22-Feb-2020  pgoyette Remove vestigial remnant of an earlier modification to the module
implementation. There currently is no such thing as a module's
"alias".
 1.17 06-Dec-2019  pgoyette Note also that the load address (if provided) is also for the module's
text segment.
 1.16 04-Dec-2019  pgoyette Note that the size returned by modctl(2) and displayed by modstat(8) is
only for the module's text section, not for the entire size of the module.

Addresses PR kern-54737
 1.15 08-Apr-2019  pgoyette branches: 1.15.2;
Split the description for EINVAL into two pieces, one for each operation
that can generate the error.
 1.14 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.13 03-Jul-2017  wiz branches: 1.13.4; 1.13.6;
Remove workaround for ancient HTML generation code.
 1.12 04-Nov-2015  pgoyette Document the ms_flags field which is now exported in struct modstat
 1.11 09-May-2015  pgoyette Provide additional info on why ENOEXEC gets returned.
 1.10 15-Jul-2014  pgoyette Document the upper limit on size of props dictionary that was recently
imposed.
 1.9 07-Aug-2012  jnemeth branches: 1.9.2; 1.9.8;
Add -A, -a, and -e options to modstat(8) along with kernel
changes required to support these options. The -e option was
requested by martin@ in private chat in order to make writing tests
easier (i.e. don't bother testing MODULAR functionaility if it
doesn't exist). While there, I added -A and -a since those were
quite similar.

-A Tells you whether or not modules can be autoloaded at the moment.
This option does take into consideration the sysctl
kern.module.autoload.

-a Tells you whether or not modules can be autoloaded at the moment.
This option does not take into consideration the sysctl
kern.module.autoload.

-e Tells you whether or not you may load a module at the moment.
 1.8 14-Dec-2010  jruoho branches: 1.8.6;
Fix xref; module(4) -> module(7).
 1.7 13-Dec-2010  jruoho Xref module(4).
 1.6 28-Nov-2010  jnemeth Rename the autoloaded property list from <module>.prop to <module>.plist
as discussed on tech-kern.
 1.5 18-Aug-2010  pgoyette Add a couple more possible return values.
 1.4 26-Oct-2009  jnemeth mention MODULE_CLASS_SECMODEL
 1.3 26-Oct-2009  jnemeth XXX - confirmed that ms_required is comma-delimited

XXX - MODULE_CLASS_ANY shouldn't be returned, but potentially could
be if a module were declared that way
 1.2 26-Oct-2009  dholland Edit - expand descriptions; document data structures in English rather
than in C; use more markup; make nroff output not exceed 80 columns.
 1.1 20-Oct-2009  jnemeth First pass at a manpage for modctl(2) (hi ad!).
 1.8.6.1 30-Oct-2012  yamt sync with head
 1.9.8.1 10-Aug-2014  tls Rebase.
 1.9.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.13.6.1 10-Jun-2019  christos Sync with HEAD
 1.13.4.1 03-Apr-2018  pgoyette Remove fixed allocation of modules' "required" lists (previously
limited to MAXMODDEPS entries). Update the modctl(MODCTL_STAT)
syscall to return the required data in a new format, and retain
the previous data format in MODCTL_OSTAT. Update the compat_80
and compat_netbsd32 modules as needed.
 1.15.2.1 09-Dec-2019  martin Pull up following revision(s) (requested by pgoyette in ticket #527):

sbin/modstat/modstat.8: revision 1.24
sbin/modstat/modstat.8: revision 1.26
lib/libc/sys/modctl.2: revision 1.16

Note that the size returned by modctl(2) and displayed by modstat(8) is
only for the module's text section, not for the entire size of the
module.

Addresses PR kern-54737

Remove superfluous Pp.
 1.53 10-Mar-2025  pgoyette revert previous. Thanks kre@ for the explanation.
 1.52 10-Mar-2025  pgoyette typo - s/to/too/
 1.51 01-Sep-2019  sevan branches: 1.51.10;
mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
 1.50 14-May-2017  wiz branches: 1.50.10; 1.50.12;
file system police.
 1.49 18-Nov-2011  christos branches: 1.49.30;
document MNT_RELATIME
 1.48 17-Jun-2011  wiz branches: 1.48.2;
Fix wording (if I understand the sentence correctly).
 1.47 17-Jun-2011  wiz New sentence, new line. Bump date for previous.
 1.46 17-Jun-2011  manu Add mount -o extattr option to enable extended attributs (corrently only
for UFS1).
Remove kernel option for EA backing store autocreation and do it by
default. Add a sysctl so that autocreated attriutr size can be modified.
 1.45 31-May-2010  njoly branches: 1.45.4;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.44 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.43 10-Apr-2009  ad softdep is gone
 1.42 15-Mar-2009  joerg Fix markup of cross reference.
 1.41 12-Mar-2009  wiz Fix error in previous, found by joerg.
 1.40 20-Oct-2008  wiz branches: 1.40.4; 1.40.6;
Sort errors, use .Nx, avoid man markup, whitespace and punctuation nits.
 1.39 19-Oct-2008  christos PR/39770: Robert Elz: mount(2) doc enhancements
 1.38 30-Nov-2007  rillig typo
 1.37 14-Jul-2007  dsl branches: 1.37.4;
Document the new 'data_len' argument.
Remove references to nfs export args and xref nfssvc(2) instead.
Change text to allow for other fs types.
 1.36 24-Feb-2006  wiz Link to getvfsstat(2) instead of getfsstat(2).
 1.35 12-Feb-2006  chs convert "magiclinks" from a per-fs mount option to a system-wide sysctl.
as discussed on tech-kern quite some time ago.
 1.34 05-Aug-2005  jmmv Lowercase after semicolon.
 1.33 23-Jun-2005  thorpej Implement expansion of special "magic" strings in symlinks into
system-specific values. Submitted by Chris Demetriou in Nov 1995 (!)
in PR kern/1781, modified only slighly by me.

This is enabled on a per-mount basis with the MNT_MAGICLINKS mount
flag. It can be enabled at mountroot() time by building the kernel
with the ROOTFS_MAGICLINKS option.

The following magic strings are supported by the implementation:

@machine value of MACHINE for the system
@machine_arch value of MACHINE_ARCH for the system
@hostname the system host name, as set with sethostname()
@domainname the system domain name, as set with setdomainname()
@kernel_ident the kernel config file name
@osrelease the releaes number of the OS
@ostype the name of the OS (always "NetBSD" for NetBSD)

Example usage:

mkdir /arch/i386/bin
mkdir /arch/sparc/bin
ln -s /arch/@machine_arch/bin /bin
 1.32 13-May-2004  wiz branches: 1.32.2;
\- is a minus, not -.
 1.31 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.30 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.29 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.28 25-Sep-2002  wiz Drop trailing space.
 1.27 21-Sep-2002  christos describe MNT_GETARGS
 1.26 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.25 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.24 16-Sep-2001  wiz Boring whitespace fixes.
 1.23 06-Mar-2000  enami branches: 1.23.6;
Document some recently added user visible mount option. Addresses PR#6577.
While I'm here, I reorderd SEE ALSO section properly.
 1.22 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.21 07-Nov-1999  lukem use .Fn appropriately
 1.20 26-Sep-1999  jdolecek xref symlink(7)
 1.19 22-Mar-1999  garbled branches: 1.19.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.18 07-Dec-1998  abs Add links to getmntinfo(3) and getfsstat(2)
 1.17 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.16 08-Jun-1998  lukem fix up case of function names
 1.15 02-Feb-1998  perry merge lite-2
 1.14 26-Nov-1997  tv Typo fix: the umount call is no longer called umount, it is now called
unmount.
 1.13 23-Oct-1996  cgd branches: 1.13.4;
document MNT_NOCOREDUMP
 1.12 29-Feb-1996  jtc Update to agree with <sys/mount.h>; From Todd C. Miller <millert@cs.colorado.edu>
 1.11 08-Feb-1996  mycroft Update to match mount(2) prototype.
 1.10 28-Nov-1995  jtc merge in changes from 1.1 release branch
 1.9 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.8 27-Feb-1995  cgd branches: 1.8.2;
merge with lite, keeping most local changes. clean up Ids
 1.7 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.6 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.5 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 08-Nov-1993  cgd fix flag name 'bug.' reported by Lennart Augustsson <augustss@cs.chalmers.se>
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.2.1 01-Nov-1995  jtc complete ufs -> ffs change (From John Kohl; PR #1403)
 1.13.4.1 27-Nov-1997  mellon Pull rev 1.14 up from trunk (tv)
 1.19.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.23.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.23.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.23.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.23.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.32.2.2 20-Jan-2006  riz Back out tickets 490, 559, and 560, which added "magic symlinks", at
the request of chs@ (thorpej@ concurs), as there is consensus that
this should be changed to a system-wide tunable, rather than a mount
option.
 1.32.2.1 29-Dec-2005  riz Pull up following revision(s) (requested by thorpej in ticket #490):
lib/libc/sys/mount.2: revision 1.33
sys/sys/systm.h: revision 1.179
sys/sys/fstypes.h: revision 1.4
include/mntopts.h: revision 1.6
sys/conf/newvers.sh: revision 1.41
sys/kern/vfs_syscalls.c: revision 1.223
sys/conf/files: revision 1.720
sys/kern/vfs_lookup.c: revision 1.61
share/man/man7/symlink.7: revision 1.7
sbin/mount/mount.8: revision 1.47
sys/kern/init_main.c: revision 1.248 via patch
share/man/man4/options.4: revision 1.280 via patch
Implement expansion of special "magic" strings in symlinks into
system-specific values. Submitted by Chris Demetriou in Nov 1995 (!)
in PR kern/1781, modified only slighly by me.
This is enabled on a per-mount basis with the MNT_MAGICLINKS mount
flag. It can be enabled at mountroot() time by building the kernel
with the ROOTFS_MAGICLINKS option.
The following magic strings are supported by the implementation:
@machine value of MACHINE for the system
@machine_arch value of MACHINE_ARCH for the system
@hostname the system host name, as set with sethostname()
@domainname the system domain name, as set with setdomainname()
@kernel_ident the kernel config file name
@osrelease the releaes number of the OS
@ostype the name of the OS (always "NetBSD" for NetBSD)
Example usage:
mkdir /arch/i386/bin
mkdir /arch/sparc/bin
ln -s /arch/@machine_arch/bin /bin
 1.37.4.1 09-Jan-2008  matt sync with HEAD
 1.40.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.40.4.2 20-Oct-2008  wiz Sort errors, use .Nx, avoid man markup, whitespace and punctuation nits.
 1.40.4.1 20-Oct-2008  wiz file mount.2 was added on branch christos-time_t on 2008-10-20 07:03:59 +0000
 1.45.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.48.2.1 17-Apr-2012  yamt sync with head
 1.49.30.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.50.12.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.50.10.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.51.10.1 02-Aug-2025  perseant Sync with HEAD
 1.29 09-Sep-2019  wiz Remove superfluous Pp.
 1.28 08-Sep-2019  sevan mprotect first appeared in SunOS 4.0
Page 25 of SunOS 4.0 Change Notes
http://chiclassiccomp.org/docs/content/computing/Sun/software/800-1731-10_SunOS4.0ChangeNotes9May88.pdf
 1.27 19-Jun-2019  uwe Small markup fixes.
 1.26 14-May-2017  wiz branches: 1.26.10;
file system police.
 1.25 06-May-2017  joerg Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.

Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.

Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.

Improve test cases to ensure correct operation of the changed
interfaces.
 1.24 03-Apr-2011  jruoho branches: 1.24.34;
.Xr uvm_map_protect, not .Fn.
 1.23 03-Apr-2011  jruoho Offset indent.
 1.22 11-Jan-2009  christos merge christos-time_t
 1.21 06-Jan-2009  wiz Add missing newline.
 1.20 05-Jan-2009  pooka Return of the Flag: There is no PROT_EXECUTE.
 1.19 13-Oct-2006  wiz branches: 1.19.26;
"occurred" with two "r", like the majority of files in this directory already
uses it.
 1.18 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 11-Aug-2002  yamt bump .Dd .
 1.13 11-Aug-2002  yamt - detail protections.
- add RETURN VALUES section.
from OpenBSD.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 26-Jun-2000  kleink branches: 1.10.2;
Finally nuke <sys/types.h> from SYNOPSIS.
 1.9 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.8 03-Feb-1998  perry branches: 1.8.6;
.Bx'ize/.Nx'ize
 1.7 16-Oct-1997  christos caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.6 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 15-Dec-1993  jtc Add explicit return types and needed header files to SYNOPSIS section.
 1.3 05-Aug-1993  jtc update manpage to -mandoc macros
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.2.4 13-Aug-2002  nathanw Catch up to -current.
 1.10.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.19.26.1 10-Jan-2009  christos sync with head.
 1.24.34.2 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.24.34.1 11-May-2017  pgoyette Sync with HEAD
 1.26.10.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10 25-Oct-2023  riastradh mremap(2): Use .Lk for links in text.

.%U is only for links in reference sections.
 1.9 03-Mar-2023  riastradh mremap(2): Note MAP_REMAPDUP bug.

XXX pullup-10, unless we fix the bug first
 1.8 01-Mar-2023  riastradh mremap(2): Fix example to use MAP_PRIVATE.

It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.

XXX pullup-9
XXX pullup-10
 1.7 03-May-2018  wiz branches: 1.7.4; 1.7.12;
Sort sections. Sort ERRORS. Remove trailing whitespace.
 1.6 02-May-2018  christos Add EXAMPLE and ERRORS section.
 1.5 06-May-2017  joerg branches: 1.5.8;
Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.

Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.

Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.

Improve test cases to ensure correct operation of the changed
interfaces.
 1.4 28-Apr-2011  wiz branches: 1.4.34;
Sort sections.
 1.3 16-Feb-2008  tnn minor pedanticism about glibc. Suggested by Joerg.
 1.2 14-Feb-2008  tnn Add a history section and a compatibility section.
 1.1 17-Jul-2007  joerg branches: 1.1.4;
Add native mremap system call based on the UVM implementation for
Linux compat. Add code to enforce alignment of the new location.
Special thanks to wizd for helping with the man page.
 1.1.4.1 23-Mar-2008  matt sync with HEAD
 1.4.34.1 11-May-2017  pgoyette Sync with HEAD
 1.5.8.1 21-May-2018  pgoyette Sync with HEAD
 1.7.12.2 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #274):

lib/libc/sys/mremap.2: revision 1.9

mremap(2): Note MAP_REMAPDUP bug.
 1.7.12.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #272):

lib/libc/sys/mremap.2: revision 1.8

mremap(2): Fix example to use MAP_PRIVATE.

It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.
 1.7.4.1 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1683):

lib/libc/sys/mremap.2: revision 1.8

mremap(2): Fix example to use MAP_PRIVATE.

It is a historical accident that MAP_PRIVATE is assumed when neither
it nor MAP_SHARED is specified.
 1.15 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.14 13-May-2004  wiz \- is a minus, not -.
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.11 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.10 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.9 16-Sep-2001  wiz Boring whitespace fixes.
 1.8 02-Dec-1999  kleink branches: 1.8.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 25-Aug-1999  thorpej branches: 1.7.4;
Update for XSH5.
 1.6 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 28-Apr-1998  fair fix mdoc references
 1.4 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.3 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.2 27-Mar-1997  mikel branches: 1.2.2;
cleanup xrefs
 1.1 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 and 1.4 up from trunk (mikel)
 1.7.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.8.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.8.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.8.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.14 13-May-2004  wiz \- is a minus, not -.
 1.13 13-May-2004  kleink Like in shmget(2), elaborate on IPC_EXCL in the description.
 1.12 16-Apr-2003  wiz branches: 1.12.2;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.11 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.10 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.9 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.8 16-Sep-2001  wiz Boring whitespace fixes.
 1.7 12-Dec-2000  briggs branches: 1.7.2;
Add a cross-reference to ftok(3).
 1.6 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.5 25-Aug-1999  thorpej branches: 1.5.4;
Update for XSH5.
 1.4 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.3 14-Mar-1999  kristerw EACESS -> EACCES. From OpenBSD.
 1.2 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.1 16-Oct-1995  jtc branches: 1.1.8;
SysV IPC manpages from Frank van der Linden
 1.1.8.1 28-Nov-1997  mellon Pull rev 1.2 up from trunk (mikel)
 1.5.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.7.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.7.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.12.2.1 14-May-2004  tron Pull up revision 1.13 (requested by kleink in ticket #327):
Like in shmget(2), elaborate on IPC_EXCL in the description.
 1.22 24-Jul-2013  skrll Bump date for previous.
 1.21 24-Jul-2013  skrll Clarify msgsz.
 1.20 15-May-2012  reinoud branches: 1.20.2;
Clarify description of the msgrcv() return value. I kept on misreading it for
some reason. This ought to clarify it a bit more.
 1.19 28-Jan-2009  wiz branches: 1.19.8; 1.19.10;
Bump date for previous. Sort ERRORS.
 1.18 26-Jan-2009  njoly Make msgsnd(2)/msgrcv(2) fail with EINVAL for messages larger than
SSIZE_MAX. Adjust man pages accordingly.

ok by christos.
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 12-Apr-2000  simonb branches: 1.11.6;
We return EIDRM if the msg queue is removed, not EINVAL.
 1.10 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 25-Aug-1999  thorpej branches: 1.9.4;
Update for XSH5.
 1.8 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.7 09-Mar-1999  ross More missing .El's.
 1.6 07-May-1998  kleink Various SysV IPC prototype changes.
 1.5 08-Feb-1998  kleink Due to the addition of EIDRM and ENOMSG, document these in the ERRORS section,
and nuke the (now obsolete) BUGS section. Bump the date.
 1.4 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.3 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.2 27-Mar-1997  mikel branches: 1.2.2;
cleanup xrefs
 1.1 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 and 1.4 up from trunk (mikel)
 1.9.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.11.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.19.10.1 30-Jul-2013  msaitoh Pull up following revision(s) (requested by skrll in ticket #922):
tests/lib/libc/sys/t_msgrcv.c 1.3
lib/libc/sys/msgrcv.2 1.21-1.22
lib/libc/sys/msgsnd.2 1.19-1.20
Fix msgsz confusion.
 1.19.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.8.1 23-May-2012  yamt sync with head.
 1.20.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20 24-Jul-2013  skrll Bump date for previous.
 1.19 24-Jul-2013  skrll Clarify msgsz.
 1.18 30-Apr-2010  jruoho branches: 1.18.6; 1.18.8; 1.18.12;
Small improvements to wording and markup.
 1.17 28-Jan-2009  wiz Bump date for previous. Sort ERRORS.
 1.16 26-Jan-2009  njoly Make msgsnd(2)/msgrcv(2) fail with EINVAL for messages larger than
SSIZE_MAX. Adjust man pages accordingly.

ok by christos.
 1.15 13-May-2004  wiz \- is a minus, not -.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Boring whitespace fixes.
 1.9 02-Dec-1999  kleink branches: 1.9.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.8 25-Aug-1999  thorpej branches: 1.8.4;
Update for XSH5.
 1.7 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.6 07-May-1998  kleink Various SysV IPC prototype changes.
 1.5 16-Feb-1998  kleink Note that EINVAL can also be caused by an mtype < 1.
 1.4 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.3 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.2 27-Mar-1997  mikel branches: 1.2.2;
cleanup xrefs
 1.1 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 and 1.4 up from trunk (mikel)
 1.8.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.9.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.9.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.9.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.18.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.8.1 30-Jul-2013  msaitoh Pull up following revision(s) (requested by skrll in ticket #922):
tests/lib/libc/sys/t_msgrcv.c 1.3
lib/libc/sys/msgrcv.2 1.21-1.22
lib/libc/sys/msgsnd.2 1.19-1.20
Fix msgsz confusion.
 1.18.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25 09-May-2014  njoly Remove error condition for negative length parameter; the
corresponding type is unsigned (size_t) and thus the value cannot be
negative.
 1.24 15-Oct-2011  rmind branches: 1.24.2; 1.24.8; 1.24.18;
Mention POSIX conformance of some functions, when they appeared, sprinkle .Xr.
 1.23 18-Oct-2005  chs remove text about converting async to sync, since we don't do it anymore.
 1.22 13-May-2004  wiz branches: 1.22.2;
\- is a minus, not -.
 1.21 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.20 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 11-Aug-2002  yamt add RETURN VALUES section.
from OpenBSD.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.15 25-Apr-2001  simonb Spell occurred correctly.
 1.14 09-Apr-2001  wiz Whitespace.
 1.13 02-Dec-1999  kleink branches: 1.13.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 22-Mar-1999  garbled branches: 1.12.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 09-Mar-1999  ross Missing .El.
Rewrite cheap .Bd -literal as a nice .Bl -column.
 1.10 02-Feb-1998  perry merge lite-2
 1.9 16-Oct-1997  christos caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.8 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.7 27-Feb-1995  cgd clean up RCS Id's
 1.6 21-Jun-1994  cgd Changes by Thorsten Lockert and myself (though my role was only minor)
to document msync's error returns.
 1.5 21-Jun-1994  cgd clean up import, rcsid
 1.4 15-Dec-1993  jtc Add explicit return types and needed header files to SYNOPSIS section.
 1.3 05-Aug-1993  jtc update manpage to -mandoc macros
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 21-Jun-1994  cgd from lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.6.4 13-Aug-2002  nathanw Catch up to -current.
 1.13.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.2.1 21-Oct-2005  riz Pull up following revision(s) (requested by chs in ticket #900):
lib/libc/sys/msync.2: revision 1.23
remove text about converting async to sync, since we don't do it anymore.
 1.24.18.1 10-Aug-2014  tls Rebase.
 1.24.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5 13-Sep-2005  christos compat core reorg.
 1.4 12-Jun-2005  lukem Add missing __RCSID()
 1.3 02-Dec-1998  thorpej Warn about references to the compatibility msync(), and direct the user to
include <sys/mman.h> to generate the correct reference.
 1.2 22-Oct-1997  fvdl New hacks to make libc work painlessly without bumping the major number:
use type func(arg1s) asm("emitted_name") gcc mechanism.
Suggested by Bill Sommerfeld.
 1.1 20-Oct-1997  thorpej branches: 1.1.2;
Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2). This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.
 1.1.2.1 22-Oct-1997  thorpej Pull up from trunk:

New hacks to make libc work painlessly without bumping the major number:
use type func(arg1s) asm("emitted_name") gcc mechanism.
Suggested by Bill Sommerfeld.
 1.21 30-May-2014  njoly len argument is of unsigned type (size_t) and thus cannot be negative;
remove corresponding statement in ERRORS.
 1.20 15-Oct-2011  rmind branches: 1.20.8; 1.20.18;
Mention POSIX conformance of some functions, when they appeared, sprinkle .Xr.
 1.19 13-May-2004  wiz \- is a minus, not -.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 26-Jun-2000  kleink branches: 1.14.2;
Finally nuke <sys/types.h> from SYNOPSIS.
 1.13 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 06-Apr-1999  cgd branches: 1.12.4;
change:
.Sh "SEE ALSO"
to:
.Sh SEE ALSO
The doc macros check for the latter (actually just for 'SEE' as the first
argument to .Sh) to set the section header SEE ALSO flag, which modifies
some behaviour (e.g. references done with .Rs/.Re).
 1.11 09-Mar-1999  ross More missing .El's.
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.8 02-Feb-1998  perry merge lite-2
 1.7 16-Oct-1997  christos caddr_t -> void *
PR/4269: Chris Demetriou: Add MS_* to msync()
 1.6 15-Jul-1997  mikel xref mmap(2), not self; xref mlock(2); sort xrefs
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 15-Dec-1993  jtc Add explicit return types and needed header files to SYNOPSIS section.
 1.3 05-Aug-1993  jtc update manpage to -mandoc macros
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.2.2 22-Mar-2002  nathanw Catch up to -current.
 1.14.2.1 08-Mar-2002  nathanw Catch up to -current.
 1.20.18.1 10-Aug-2014  tls Rebase.
 1.20.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25 25-Oct-2017  abhinav Correct the standard version for clock_nanosleep (based on the FreeBSD man page)
 1.24 25-Oct-2017  abhinav Add clock_nanosleep to the NAME section
 1.23 14-Nov-2016  wiz Whitespace.
 1.22 11-Nov-2016  christos Explain rmtp setting.
 1.21 16-Jun-2016  ryoon branches: 1.21.2;
Bump date for previous
 1.20 16-Jun-2016  ryoon Fix typo
 1.19 30-Dec-2015  wiz Fix xrefs.
 1.18 30-Dec-2015  plunky point to more information about clock_id
 1.17 02-Oct-2015  christos PR/50295: Fix clock_nanosleep return value documentation.
 1.16 02-Feb-2014  wiz Mark up HZ.
 1.15 01-Feb-2014  christos mention how HZ affects us
 1.14 25-Dec-2013  dholland typo
 1.13 08-Oct-2012  njoly Function argument Fa macro expects its name on the same line.
 1.12 02-Oct-2012  christos add clock_nanosleep(2)
 1.11 17-May-2010  jruoho branches: 1.11.6; 1.11.12;
Reference timeval(3).
 1.10 13-May-2004  wiz \- is a minus, not -.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.6 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.4 10-Jul-2000  kleink branches: 1.4.2;
Add a name description as well.
 1.3 07-Jul-2000  fair Add a proper DESCRIPTION to the man page, per PR 10072.
 1.2 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.1 17-Apr-1997  jtc branches: 1.1.4; 1.1.8;
Documentation for the new nanosleep syscall.
Hacked out from the sleep(3) and other exiting manpages.
 1.1.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.4.1 07-Jul-2000  he Pull up revision 1.3 (requested by fair):
Provide text in the DESCRIPTION section.
Fixes PR#10072.
 1.4.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.4.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.4.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.11.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.11.6.1 30-Oct-2012  yamt sync with head
 1.21.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.25 08-Jun-2021  hannken Document NFSSVC_REPLACEEXPORTSLIST instead of NFSSVC_SETEXPORTSLIST.

The latter is deprecated and kept only for backwards compatibility.
 1.24 10-Mar-2009  joerg Specify width for tag list
 1.23 29-Dec-2006  yamt branches: 1.23.22;
remove nqnfs. pointed by Tom Spindler.
 1.22 23-Sep-2005  wiz Use only mdoc macros; remove unneeded Nm argument; use more
macros; English improvements.
 1.21 23-Sep-2005  jmmv Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 09-Apr-2001  wiz Remove reference to nfsiod(8), which is long gone.
 1.12 07-Nov-2000  lukem branches: 1.12.2;
fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
using `.Nm ""' if there's stuff following, or for the 2nd and so on
occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
 1.11 15-Apr-2000  tsarna branches: 1.11.4;
Death to nfsiod!

It is replaced by kernel threads that do the same thing. The number of
kernel threads used is set with the vfs.nfs.iothreads sysctl.
 1.10 11-Dec-1999  msaitoh use .Er
 1.9 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.8 30-Apr-1998  fair branches: 1.8.6;
fix .Xr reference
 1.7 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 01-Aug-1993  mycroft Add RCS indentifiers.
 1.2 11-May-1993  glass calling sequence was totally wrong. documented calling sequence (basically
the types). real documentation is a waste as nothing but nfsd(8) calls
it and the interface changes a great deal in 4.4
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.4.1 24-Apr-2001  he Pull up revision 1.13 (requested by wiz):
Remove reference to nfsiod(8), which is gone.
 1.12.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.12.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.12.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.23.22.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.12 28-Aug-2016  dholland fix broken xrefs
 1.11 07-Dec-2015  pgoyette Update to match reality. For these functions, we still try the system
call first, and only fall back to /dev/clockctl if the system call
fails.
 1.10 18-May-2009  wiz Bump date for last effective change.
 1.9 30-Apr-2008  martin branches: 1.9.8;
Convert TNF licenses to new 2 clause variant
 1.8 22-Oct-2007  simonb branches: 1.8.6;
Add a reference to RFC 2783. Requested by joerg@
 1.7 04-Jun-2006  chap branches: 1.7.10;
Document the recent trunk changes to ntp_gettime(2) (Hi Matthias!).
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.3 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 07-Sep-2001  wiz branches: 1.2.2;
Follow a hint by Simon Burge (first part of diff), and comment in
a xref to hz(9) now that it exists (second part).
 1.1 06-Sep-2001  wiz Add ntp_adjtime(2) and ntp_gettime(2) man page.
 1.2.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.2.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.2.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.2.2.1 07-Sep-2001  nathanw file ntp_adjtime.2 was added on branch nathanw_sa on 2001-10-08 20:21:58 +0000
 1.7.10.1 06-Nov-2007  matt sync with HEAD
 1.8.6.1 18-May-2008  yamt sync with head.
 1.9.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9.8.1 30-Apr-2008  martin file ntp_adjtime.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.13 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.12 15-Oct-2011  christos branches: 1.12.2;
close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
fopen(db, "re")
 1.11 23-Nov-2007  uebayasi KNF; no variable name in function prototype.
 1.10 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.9 17-Jan-2007  hubertf branches: 1.9.4;
Remove more duplicate #includes, and a few spurious whitespaces at EOL
From Slava Semushin <slava.semushin@gmail.com>
 1.8 07-Oct-2006  kardel - simplify code
- remove any 'permission checks' via geteuid() - with upcoming
security models these might not match the model any more
- this also fixes a bug where ntp_adjtime() was denied (EPERM)
even though only a legit read status was performed
 1.7 09-Mar-2006  christos Do not use SCARG() in userland. Eliminates need for <sys/systm.h>.
 1.6 12-Jun-2005  lukem Add missing __RCSID()
 1.5 16-Jul-2003  cb Mark __clockctl_fd close-on-exec to avoid unintentionally leaking
time setting privileges across an exec.
 1.4 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.3 09-Dec-2001  manu - Changed clocktl interface to use syscallargs structures
- Implemented keep-state so that we don't have to open /dev/clockctl each time.
 1.2 17-Sep-2001  thorpej branches: 1.2.2;
Need string.h for memcpy() prototype.
 1.1 16-Sep-2001  manu Added support to use the clockctl driver if present for adjtime(),
clock_settime(), ntp_adjtime() and settimeofday(). The super-user still
always use the plain system call.
Approved by Christos
 1.2.2.3 28-Jan-2002  nathanw Catch up to -current.
 1.2.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.2.2.1 17-Sep-2001  nathanw file ntp_adjtime.c was added on branch nathanw_sa on 2001-10-08 20:21:58 +0000
 1.9.4.1 09-Jan-2008  matt sync with HEAD
 1.12.2.1 17-Apr-2012  yamt sync with head
 1.67 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.66 05-Mar-2023  thorpej branches: 1.66.2;
Document the error code when O_REGULAR is specified and the last
path component is not a regular file.
 1.65 17-Mar-2021  wiz branches: 1.65.6;
Remove superfluous article.
 1.64 17-Mar-2021  dholland Clarify use of open flags in open(2).

(Avoid using values of three that are equal to four.)
 1.63 30-Nov-2020  riastradh Note that open(O_ASYNC) does not work as advertised.

This matches Linux, which also advertises the same semantics and
fails to implement it, according to:

https://man7.org/linux/man-pages/man2/fcntl.2.html

(At what point should we collectively stop advertising the semantics
that doesn't work and call the bug a feature?)
 1.62 16-Sep-2019  wiz Sort errors.
 1.61 15-Sep-2019  christos Document O_EXEC, and add some extra explanation for O_CREAT from FreeBSD.
 1.60 01-Sep-2019  sevan Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
 1.59 13-Nov-2017  wiz branches: 1.59.4; 1.59.6;
Remove Tn.
 1.58 09-Nov-2017  christos Add O_REGULAR to enforce opening of only regular files
(like we have O_DIRECTORY for directories).
This is better than open(, O_NONBLOCK), fstat()+S_ISREG() because opening
devices can have side effects.
 1.57 14-May-2017  wiz branches: 1.57.2;
file system police.
 1.56 29-Jul-2013  njoly branches: 1.56.16;
Add openat(2) specific errors.
 1.55 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.54 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.53 01-Dec-2012  wiz Remove trailing whitespace.
 1.52 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.51 25-Jan-2012  christos branches: 1.51.6;
As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
 1.50 20-Apr-2011  christos branches: 1.50.4;
sync with reality (prototype of open is varyadic)
 1.49 11-Apr-2011  wiz exec is on a higher plane of existence.
 1.48 10-Apr-2011  christos Document O_CLOEXEC.
 1.47 22-Sep-2010  wiz Bump date for O_DIRECTORY, more markup, merge two error sections.
 1.46 21-Sep-2010  chs implement O_DIRECTORY as standardized in POSIX-2008,
for both native and linux emulations.
this fixes the rest of PR 43695.
 1.45 06-Sep-2010  wiz O_NOFOLLOW is not a non-standard extension any longer (2, 6 years? who counts).
 1.44 06-Sep-2010  wiz Note a difference to IEEE Std 2003.1-2008. Bump date.
 1.43 05-Sep-2010  wiz Explain how O_NOFOLLOW may cause EFTYPE. From joerg.
While here, sort errors. Bump date.
 1.42 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.41 05-Apr-2010  wiz Sort ERRORS section.
 1.40 03-Apr-2010  jruoho Mention the history of stat(2) and fix the history of open(2).
 1.39 26-Oct-2006  wiz Bump date for previous.
 1.38 23-Oct-2006  rillig open(2) can fail with EPERM.
 1.37 13-Oct-2006  wiz Bump date for previous.
New sentence, new line.
 1.36 05-Oct-2006  chs add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).
 1.35 23-Sep-2006  wiz Add article. Remove superfluous braces.
 1.34 23-Sep-2006  mishka lib/26532: Manual page for open(2) bit difficult to understand:
apply patch with small improvement - s/conditions/methods/
 1.33 11-Aug-2005  pooka document the flags O_ALT_IO and O_NOCTTY
 1.32 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.31 08-May-2003  lukem O_NOFOLLOW is another non-standard extension
 1.30 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.29 15-Mar-2003  wiz Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
 1.28 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.27 06-Dec-2002  christos Provide O_NOFOLLOW with compatibility with the joneses.
 1.26 20-Aug-2002  wiz -1 -> \-1.
 1.25 17-Aug-2002  yamt - move return values info into RETURN VALUES section.
- note that O_SHLOCK and O_EXLOCK are not portable.
from OpenBSD.
 1.24 13-Jun-2002  christos Remove the cross reference of fileno(3). It is more appropriate to
cross reference this from fopen(3). After discussion with John Heasley
in PR/17224.
 1.23 12-Jun-2002  wiz Add Xr to fileno(3), as request in lib/17224.
 1.22 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.21 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.20 16-Sep-2001  wiz Boring whitespace fixes.
 1.19 17-Jun-2000  hubertf branches: 1.19.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.18 02-Dec-1999  kleink branches: 1.18.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.17 21-Oct-1999  erh Add ENXIO error for FIFOs.
 1.16 22-Mar-1999  garbled branches: 1.16.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.15 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.14 02-Aug-1998  kleink Per IEEE Std 1003.1b-1993, Synchronous I/O Option, add O_DSYNC (synchronized
I/O data integrity completion) and O_RSYNC (complete read operations at the
same level of integrity requested for write operations).
 1.13 28-Apr-1998  fair fix mdoc references
 1.12 15-Jan-1998  thorpej Document the O_SYNC flag, and where its semantics are defined (XPG4.2).
Be more clear about how file access modes are specified, and do a bit
of general cleanup.
 1.11 01-Nov-1997  mycroft Nuke trailing comma in SEE ALSO section.
 1.10 11-Jul-1997  mikel branches: 1.10.2;
xref getdtablesize(3) not getdtablesize(2)
 1.9 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.8 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.7 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.6 11-Apr-1994  glass bleh
 1.5 15-Dec-1993  jtc Tell user to #include <fcntl.h>, not <sys/fcntl.h> or <sys/file.h>.
 1.4 01-Dec-1993  jtc Manpage formatting tweaks.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.2.1 29-Jan-1998  mellon Pull up 1.11 and 1.12 (thorpej)
 1.16.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.19.4.6 10-Dec-2002  thorpej Sync with HEAD.
 1.19.4.5 27-Aug-2002  nathanw Catch up to -current.
 1.19.4.4 21-Jun-2002  nathanw Catch up to -current.
 1.19.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.19.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.19.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.50.4.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.50.4.3 23-Jan-2013  yamt sync with head
 1.50.4.2 16-Jan-2013  yamt sync with (a bit old) head
 1.50.4.1 17-Apr-2012  yamt sync with head
 1.51.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.51.6.2 25-Feb-2013  tls resync with head
 1.51.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.56.16.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.57.2.1 12-Apr-2018  msaitoh Pull up following revision(s) (requested by christos in ticket #741):
lib/libc/stdio/flags.c: revision 1.19
lib/libc/stdio/fdopen.c: revision 1.18
sys/kern/vfs_vnops.c: revision 1.196
lib/libc/stdio/freopen.c: revision 1.20
lib/libc/stdio/fopen.c: revision 1.17
external/bsd/nvi/dist/common/recover.c: revision 1.10
external/bsd/nvi/dist/common/recover.c: revision 1.11
lib/libc/sys/open.2: revision 1.58
sys/sys/fcntl.h: revision 1.49
make the checkok test stricter to avoid races, and use O_REGULAR.
Instead of opening the file and using popen(3), pass the file descriptor
to sendmail directory. Idea and code from Todd Miller.
Add O_REGULAR to enforce opening of only regular files
(like we have O_DIRECTORY for directories).
This is better than open(, O_NONBLOCK), fstat()+S_ISREG() because opening
devices can have side effects.
 1.59.6.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.59.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.65.6.1 07-Mar-2023  martin Pull up following revision(s) (requested by thorpej in ticket #114):

lib/libc/sys/open.2: revision 1.66

Document the error code when O_REGULAR is specified and the last
path component is not a regular file.
 1.66.2.1 02-Aug-2025  perseant Sync with HEAD
 1.28 09-Jun-2014  njoly Replace wrong numeric values with corresponding symbolic constants.
While here, remove unneeded paragraph macro.
 1.27 26-Jul-2010  njoly branches: 1.27.12; 1.27.22;
Improve _PC_NO_TRUNC description. From Matthew Mondor on
current-users@.
 1.26 22-Jul-2010  wiz Bump date for _PC_NO_TRUNC description fix.
 1.25 22-Jul-2010  njoly Fix wrong value (1 -> 0) in _PC_NO_TRUNC description.
 1.24 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.23 22-Apr-2010  jruoho Use .In for includes.
 1.22 11-Mar-2009  joerg Fix markup
 1.21 14-Aug-2008  wiz branches: 1.21.6; 1.21.8;
Bump date for previous.
Sort ERRORS, and merge two entries for the same errno value.
 1.20 14-Aug-2008  matt Implement following constants and add support their to the UFS family of file
systems:
_PC_2_SYMLINKS
_PC_SYMLINK_MAX

From andy dot shevchenko at gmail dot com.
 1.19 14-Aug-2005  jmmv branches: 1.19.20;
Fix typo.
 1.18 06-Jan-2005  jmmv Fix a typo and add a missing blank line.
 1.17 19-May-2004  kleink * Note string termination behaviour of NAME_MAX vs. PATH_MAX.
* Replace reference to non-existant KERN_NAME_MAX appropriately with
{NAME_MAX}.
 1.16 13-May-2004  wiz \- is a minus, not -.
 1.15 07-Aug-2003  agc branches: 1.15.2;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 22-Mar-1999  kleink Introduce _PC_FILESIZEBITS.
 1.7 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.6 07-Aug-1998  kleink Document _PC_SYNC_IO.
 1.5 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.4 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.3 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.2 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.1 07-May-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 07-May-1994  cgd new syscalls
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.15.2.1 22-May-2004  he Pull up revision 1.17 (requested by kleink in ticket #357):
* Note string termination behaviour of NAME_MAX vs. PATH_MAX.
* Replace reference to non-existant KERN_NAME_MAX appropriately
with {NAME_MAX}.
 1.19.20.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.21.8.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.21.6.2 14-Aug-2008  wiz Bump date for previous.
Sort ERRORS, and merge two entries for the same errno value.
 1.21.6.1 14-Aug-2008  wiz file pathconf.2 was added on branch christos-time_t on 2008-08-14 18:00:09 +0000
 1.27.22.1 10-Aug-2014  tls Rebase.
 1.27.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.34 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.33 01-Nov-2024  nia libc: Expose pipe2 and dup3 to POSIX.2024 applications
 1.32 27-Nov-2020  kamil branches: 1.32.8;
Refine the documentation

Sort includes.
Correct the historical note, pipe first appeared in AT&T UNIX v3.
Document ENOMEM.
 1.31 25-Oct-2017  abhinav Add pipe2 to the NAME section
 1.30 22-Feb-2014  dholland pipe2 requires fcntl.h for its flags; PR 48614 from Steffen Daode Nurpmeso.
Also fix the wording for EINVAL as suggested by Robert Elz.
 1.29 23-Apr-2013  elric For pipe2(2), EINVAL won't be returned if the flag is O_NOSIGPIPE.
 1.28 25-Jan-2012  christos branches: 1.28.6;
As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
 1.27 22-Jul-2011  wiz branches: 1.27.2;
Consistently mark up defined values with Dv.
 1.26 15-Jul-2011  christos mention EINVAL.
 1.25 15-Jul-2011  jruoho Small markup edit.
 1.24 27-Jun-2011  wiz Various minor improvements.
 1.23 26-Jun-2011  christos * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.22 13-May-2004  wiz \- is a minus, not -.
 1.21 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.20 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 23-Nov-2001  jhawk Grammar nit from 1.14.
Dd from 1.5.
 1.15 16-Oct-2001  wiz Boring whitespace or punctuation fixes.
 1.14 02-Oct-2001  sommerfeld Clarify that you may get a signal instead of EFAULT.
 1.13 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 02-Dec-1999  kleink branches: 1.11.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 22-Mar-1999  garbled branches: 1.10.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9 17-Sep-1997  cgd "int filedes[2]" is more correct than "int *filedes" in synopsis.
 1.8 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.7 15-May-1997  kleink Update standards conformance.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 17-Jul-1994  mycroft pipe(2) is no longer implemented using socketpair(2).
 1.4 29-Nov-1993  jtc branches: 1.4.2;
Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 22-Jul-1994  cgd from trunk
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.11.6.5 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.4 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.3 28-Jan-2002  nathanw Catch up to -current.
 1.11.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.27.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.2.1 17-Apr-2012  yamt sync with head
 1.28.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.6.1 23-Jun-2013  tls resync from head
 1.32.8.1 02-Aug-2025  perseant Sync with HEAD
 1.8 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.7 31-Oct-2005  wiz branches: 1.7.84; 1.7.86;
Bump date for previous. Use more appropriate markup.
Add an article.
 1.6 27-Oct-2005  uwe Document PMC_INFO_CPUCTR_TYPE.
 1.5 13-May-2004  wiz \- is a minus, not -.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.2 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.1 07-Aug-2002  briggs branches: 1.1.2;
Add stubs to new system calls for performance monitoring interface.
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 07-Aug-2002  nathanw file pmc_control.2 was added on branch nathanw_sa on 2002-08-13 01:00:00 +0000
 1.7.86.1 10-Jun-2019  christos Sync with HEAD
 1.7.84.1 28-Jul-2018  pgoyette Sync with HEAD
 1.38 07-Jul-2023  riastradh select(2), poll(2): Clarify return values.
 1.37 09-Feb-2021  wiz branches: 1.37.6;
Try improving readability in wrt negations.

Use Nx. Remove trailing whitespace. Fix some typos.
 1.36 09-Feb-2021  dholland Document in poll(2) that poll first appeared in NetBSD in NetBSD 1.3.
 1.35 09-Feb-2021  dholland typo in previous.
 1.34 09-Feb-2021  dholland Rework the text of poll(2) for clarity. Bump date.
 1.33 07-Feb-2021  rillig poll.2: fix typo in manual page
 1.32 17-Jul-2020  wiz Remove trailing whitespace.
 1.31 17-Jul-2020  kamil Add ppoll() a compatibility wrapper around pollts(2)

Submitted by Apurva Nandan.
 1.30 06-May-2019  wiz Remove extra word.
 1.29 06-May-2019  christos document the EINVAL caused by a large nfds.
 1.28 22-Mar-2010  joerg branches: 1.28.46;
Use .In for header files instead of .Ar Pa and variations.
 1.27 30-Apr-2008  martin branches: 1.27.8;
Convert TNF licenses to new 2 clause variant
 1.26 13-Oct-2006  wiz branches: 1.26.16;
Fix date string.
 1.25 08-Sep-2006  uebayasi Clarify POLLOUT and POLLWRNORM are equivalent. Bump date.

Reviewed By: wiz
 1.24 10-Mar-2005  kleink Crank the copyright year.
 1.23 10-Mar-2005  wiz End sentence with a dot. Remove trailing whitespace.
 1.22 10-Mar-2005  kleink s/nil pointer/null pointer/
 1.21 10-Mar-2005  kleink Add pollts() prototype to <poll.h>, and update manual page synopsis for
pollts() header use.
 1.20 28-Feb-2005  wiz Bump date for pollts.
 1.19 26-Feb-2005  matt Build syscalls stubs for pselect and pollts. Update man pages.
 1.18 13-May-2004  wiz \- is a minus, not -.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.14 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.13 04-Jan-2002  wiz Improve grammar.
 1.12 03-Jan-2002  jdolecek Add a note that POLLIN event is returned rather than POLLHUP when
remote end of a socket is closed.
Adresses kern/5486 by Ignatios Souvatzis.
 1.11 14-Nov-2001  christos mention that we ignore negative fds.
 1.10 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.9 25-Apr-2001  simonb Spell occurred correctly.
 1.8 02-Dec-1999  kleink branches: 1.8.4; 1.8.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 22-Mar-1999  garbled branches: 1.7.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.6 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.5 15-Aug-1998  mycroft Assign my copyrights to TNF.
 1.4 21-Nov-1997  kleink Update for nfds_t.
 1.3 07-Sep-1996  mycroft Mention that timeout is in milliseconds.
 1.2 07-Sep-1996  mycroft Document the use of INFTIM.
 1.1 07-Sep-1996  mycroft Add a poll(2) man page.
 1.7.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.8.6.5 22-Mar-2002  nathanw Catch up to -current.
 1.8.6.4 08-Mar-2002  nathanw Catch up to -current.
 1.8.6.3 28-Jan-2002  nathanw Catch up to -current.
 1.8.6.2 16-Nov-2001  thorpej Fix merge errors from last sync w/ -current.
 1.8.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.8.4.1 24-Dec-2001  he Pull up revision 1.11 (requested by skrll):
Make poll(2) ignore negative file descriptors, which is in line
with the Single Unix Specification.
 1.26.16.1 18-May-2008  yamt sync with head.
 1.27.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.27.8.1 30-Apr-2008  martin file poll.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.28.46.1 10-Jun-2019  christos Sync with HEAD
 1.37.6.1 11-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #946):

lib/libc/sys/poll.2: revision 1.38
lib/libc/sys/select.2: revision 1.44
lib/libc/sys/select.2: revision 1.45
lib/libc/sys/select.2: revision 1.46

select(2), poll(2): Clarify return values.

select.2: note when pselect(2) was added

select(2): Cite standards conformance in man page.
(Should we cite the earliest standard, or the most recent standard,
if they're the same as far as anyone has noticed?)

PR standards/49999: the history and standards conformance of
pselect(2) is not documented
 1.6 19-Dec-2016  abhinav Fix sentence.
 1.5 04-Feb-2013  wiz branches: 1.5.12;
Bump date for previous.
 1.4 04-Feb-2013  njoly According to the opengroup document [1], we should include fcntl.h (not
sys/fcntl.h) for posix_fadvise().

[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
 1.3 09-Jun-2009  yamt branches: 1.3.6; 1.3.12;
don't bother to say that some advises are not implemented.
ignoring them is a valid implementation.
 1.2 24-Feb-2006  wiz Improve English, fix a typo.
 1.1 19-Feb-2006  yamt document posix_fadvise.
 1.3.12.1 25-Feb-2013  tls resync with head
 1.3.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.12.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 27-Jan-2008  martin branches: 1.1.4; 1.1.6;
libc part of posix_fadvise changes.
The new compatibility stub is ABI compatible to the old syscall, so no
need to bump libc minor.
 1.1.6.1 18-May-2008  yamt sync with head.
 1.1.4.2 23-Mar-2008  matt sync with HEAD
 1.1.4.1 27-Jan-2008  matt file posix_fadvise.c was added on branch matt-armv6 on 2008-03-23 00:40:26 +0000
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file posix_fadvise.c was added on branch christos-time_t on 2008-04-28 20:23:01 +0000
 1.2 30-Jun-2016  dholland PR 51287 Ralf Nolden: posix_fallocate belongs in <fcntl.h>
 1.1 25-Sep-2014  manu branches: 1.1.2;
Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
 1.1.2.2 08-Feb-2015  snj Pull up following revision(s) (requested by christos in ticket #472):
lib/libc/include/namespace.h: revision 1.175
lib/libc/sys/Makefile.inc: revision 1.225, 1.227
lib/libc/sys/fdiscard.2: revision 1.3
lib/libc/sys/fdiscard.c: revision 1.1
lib/libc/sys/posix_fallocate.c: revision 1.1
Fix argument paddiing for posix_fallocate and fdiscard with gcc 1.x
--
PR/49617: Kirk Russell: posix_fallocate() should be returning an error on
failure, without setting errno, so make it PSEUDO_NOERROR, by adding a new
category GLUENOERR.
--
PR/49617: Kirk Russell: Describe the posix_fallocate return values correctly.
 1.1.2.1 25-Sep-2014  snj file posix_fallocate.c was added on branch netbsd-7 on 2015-02-08 22:05:55 +0000
 1.1 22-Apr-2008  rmind branches: 1.1.4; 1.1.10;
Add posix_madvise(2) and appropriate definitions in sys/mman.h header.
This interface is identical to madvise(2), however, is defined by POSIX.
Partially sync madvise(2) man page with FreeBSD.

Reviewed by <mrg>.
 1.1.10.2 22-Apr-2008  rmind Add posix_madvise(2) and appropriate definitions in sys/mman.h header.
This interface is identical to madvise(2), however, is defined by POSIX.
Partially sync madvise(2) man page with FreeBSD.

Reviewed by <mrg>.
 1.1.10.1 22-Apr-2008  rmind file posix_madvise.c was added on branch christos-time_t on 2008-04-22 10:42:17 +0000
 1.1.4.2 18-May-2008  yamt sync with head.
 1.1.4.1 22-Apr-2008  yamt file posix_madvise.c was added on branch yamt-pf42 on 2008-05-18 12:30:21 +0000
 1.1 17-Jul-2020  kamil Add ppoll() a compatibility wrapper around pollts(2)

Submitted by Apurva Nandan.
 1.9 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.8 10-Nov-2006  christos branches: 1.8.8;
fix lint.
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.6 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.5 22-Jan-2000  mycroft branches: 1.5.6;
Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.4 15-Nov-1998  christos delint
 1.3 14-Oct-1998  kleink Need internal names for ftruncate(), lseek(), mmap(), pread() and pwrite().
 1.2 02-Jul-1998  thorpej int -> ssize_t ... today is not my day.
 1.1 02-Jul-1998  thorpej Wrappers around the indirected positional i/o system calls; the off_t
arguments must be padded.
 1.5.6.1 02-Aug-2002  nathanw Adapt to new syscall stub and weak name convention.
 1.8.8.1 09-Jan-2008  matt sync with HEAD
 1.7 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.6 23-Nov-2007  uebayasi branches: 1.6.30;
KNF; no variable name in function prototype.
 1.5 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.4 07-Aug-2003  agc branches: 1.4.22;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.3 15-Nov-1998  christos delint
 1.2 02-Jul-1998  thorpej int -> ssize_t ... today is not my day.
 1.1 02-Jul-1998  thorpej Wrappers around the indirected positional i/o system calls; the off_t
arguments must be padded.
 1.4.22.1 09-Jan-2008  matt sync with HEAD
 1.6.30.1 17-Apr-2012  yamt sync with head
 1.14 18-Jun-2016  kamil Use generic types in the profil(2) function prototype (<unistd.h>)
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.12 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.11 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.10 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.9 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 30-Jan-2002  ross Note #include <unistd.h> in SYNOPSIS
 1.7 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.6 24-Oct-2000  erh branches: 1.6.2;
Document the PROFDIR environment variable.
 1.5 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.4 29-May-1997  cgd branches: 1.4.8;
Fix broken uses of Dd. Both the mdoc and mdoc.samples pages agree:
.Dd is supposed to be invoked like:
.Dd month day, year
e.g. ".Dd January 25, 1989", rather than:
.Dd "month day, year"
which is what these pages did.
 1.3 22-Nov-1995  cgd change definition of profil() to make it 64-bit friendly. This has
no practical consequence on 32-bit systems. old prototype was
int profil(char *, int, int, int), and new one is int profile(char *,
size_t, u_long, u_int). the size_t is the size of the buffer,
and the u_long is the 'starting offset'. (I changed the last int
to u_int, because it's treated as a u_int everywhere, and isn't
logically a signed value.)
 1.2 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.1 27-Feb-1995  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.4.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.6.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.6.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.6.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.86 12-May-2024  msaitoh s/unitialized/uninitialized/
 1.85 14-May-2020  wiz Use more markup.
 1.84 14-May-2020  kamil Introduce new ptrace(2) operations: PT_SET_SIGPASS and PT_GET_SIGPASS

They deliver the logic of bypassing selected signals directly to the
debuggee, without informing the debugger.

This can be used to implement the QPassSignals GDB/LLDB protocol.

This call can be useful to avoid signal races in ATF ptrace tests.
 1.83 04-Jan-2020  kamil Document PT_LWPSTATUS and PT_LWPNEXT in ptrace(2)

Remove mentions of obsolete PT_LWPINFO.
 1.82 09-Oct-2019  wiz Fix xref.
 1.81 09-Oct-2019  kamil Document PT_STOP, update PT_KILL in the ptrace(2) man-page

Formatting by <mgorny>
 1.80 30-Jul-2019  mgorny Include pe_lwp member in 'struct ptrace_state'

Reviewed by kamil.
 1.79 11-Jul-2019  mgorny branches: 1.79.2;
Fix thinko: syscalls -> signals
 1.78 10-Jul-2019  mgorny Improve/fix doc of PT_SETSTEP and PT_CLEARSTEP.

Reviewed by kamil.
 1.77 10-Jul-2019  mgorny Fix typo: SIGRAP -> SIGTRAP
 1.76 26-Jun-2019  wiz Use Vt for variable types. New sentence, new line. Add a missing ')'.
Add/remove some articles or other missing words.
 1.75 26-Jun-2019  mgorny Implement PT_GETXSTATE and PT_SETXSTATE

Introduce two new ptrace() requests: PT_GETXSTATE and PT_SETXSTATE,
that provide access to the extended (and extensible) set of FPU
registers on amd64 and i386. At the moment, this covers AVX (YMM)
and AVX-512 (ZMM, opmask) registers. It can be easily extended
to cover further register types without breaking backwards
compatibility.

PT_GETXSTATE issues the XSAVE instruction with all kernel-supported
extended components enabled. The data is copied into 'struct xstate'
(which -- unlike the XSAVE area itself -- has stable format
and offsets).

PT_SETXSTATE issues the XRSTOR instruction to restore the register
values from user-provided 'struct xstate'. The function replaces only
the specific XSAVE components that are listed in 'xs_rfbm' field,
making it possible to issue partial updates.

Both syscalls take a 'struct iovec' pointer rather than a direct
argument. This requires the caller to explicitly specify the buffer
size. As a result, existing code will continue to work correctly
when the structure is extended (performing partial reads/updates).
 1.74 12-Jun-2019  wiz Fix typo.
 1.73 12-Jun-2019  kamil Try to make posix_spawn(3) note in ptrace(2) less confusing
 1.72 12-Jun-2019  wiz Use Xr.
 1.71 11-Jun-2019  kamil Document PTRACE_POSIX_SPAWN in man-page
 1.70 25-May-2019  kamil Update the ptrace(2) documentation

Document that TRAP_EXEC can be returned for PT_SYSCALL.
Document truncated byte transfers.
 1.69 01-May-2018  kamil branches: 1.69.2;
Implement PTRACE_VFORK

Add support for tracing vfork(2) events in the context of ptrace(2).

This API covers other frontends to fork1(9) like posix_spawn(2) or clone(2),
if they cause parent to wait for exec(2) or exit(2) of the child.

Changes:
- Add new argument to sigswitch() determining whether we need to acquire
the proc_lock or whether it's already held.
- Refactor fork1(9) for fork(2) and vfork(2)-like events.
Call sigswitch() from fork(1) for forking or vforking parent, instead of
emitting kpsignal(9). We need to emit the signal and suspend the parent,
returning to user and relock proc_lock.
- Add missing prototype for proc_stop_done() in kern_sig.c.
- Make sigswitch a public function accessible from other kernel code
including <sys/signalvar.h>.
- Remove an entry about unimplemented PTRACE_VFORK in the ptrace(2) man page.
- Permin PTRACE_VFORK in the ptrace(2) frontend for userland.
- Remove expected failure for unimplemented PTRACE_VFORK tests in the ATF
ptrace(2) test-suite.
- Relax signal routing constraints under a debugger for a vfork(2)ed child.
This intended to protect from signaling a parent of a vfork(2)ed child that
called PT_TRACE_ME, but wrongly misrouted other signals in vfork(2)
use-cases.

Add XXX comments about still existing problems and future enhancements:
- correct vfork(2) + PT_TRACE_ME handling.
- fork1(2) handling of scenarios when a process is collected in valid but
rare cases.

All ATF ptrace(2) fork[1-8] and vfork[1-8] tests pass.

Fix PR kern/51630 by Kamil Rytarowski (myself).

Sponsored by <The NetBSD Foundation>
 1.68 05-Mar-2018  kamil branches: 1.68.2;
Remove PT_GET_SIGMASK / PT_SET_SIGMASK

These operations cloned Linux's specific PTRACE_GETSIGMASK / PTRACE_SETSIGMASK.
This feature was useful in applications like rr/criu/reptyr-like, where
the ptrace(2) interface is abused for the purpose of constructing an arbitrary
process. It's not reliable and not portable. For the NetBSD case it will be
better to invent something dedicated for serializing and deserializing a
process with threads.

Noted on tech-toolchain@ and blog entry

"LLDB restoration and return to ptrace(2)"
https://blog.netbsd.org/tnf/entry/lldb_restoration_and_return_to
 1.67 03-Jun-2017  abhinav branches: 1.67.2;
Fix typo: s/interrput/interrupt/
 1.66 08-Apr-2017  kamil Fix typo in previous (ptrace(2))
 1.65 08-Apr-2017  kamil Document new calls and be more clear about PT_SYSCALL* in ptrace(2)

Document PT_SETSTEP and PT_CLEARSTEP in ptrace(2).

Try to explain more details of PT_SYSCALL and PT_SYSCALLEMU.

The description of PT_*STEP has been obtained from FreeBSD.

Sponsored by <The NetBSD Foundation>
 1.64 07-Apr-2017  pgoyette Fix typos and some grammar
 1.63 07-Apr-2017  kamil Correction in ptrace(2) about operations that emit signals

PT_STEP and PT_DETACH cannot emit signals
PT_CONTINUE and PT_SYSCALL can emit signals

Pointed out by <chs>
 1.62 23-Feb-2017  wiz Formatting fix.
 1.61 23-Feb-2017  kamil Document PT_GETDBREGS and PT_SETDBRGS in ptrace(2)

Not this interface in MD part.
Explain design choices.

Sponsored by <The NetBSD Foundation>
 1.60 22-Feb-2017  kamil Introduce new ptrace(2) API to allow/prevent exection of LWP

Introduce new API for debuggers to allow/prevent execution of the specified
thread.

New ptrace(2) operations:

PT_RESUME Allow execution of a specified thread, change its state
from suspended to continued. The addr argument is unused.
The data argument specifies the LWP ID.

This call is equivalent to _lwp_continue(2) called by a
traced process. This call does not change the general
process state from stopped to continued.

PT_SUSPEND Prevent execution of a specified thread, change its state
from continued to suspended. The addr argument is unused.
The data argument specifies the requested LWP ID.

This call is equivalent to _lwp_suspend(2) called by a
traced process. This call does not change the general
process state from continued to stopped.

This interface is modeled after FreeBSD, however with NetBSD specific arguments
passed to ptrace(2) -- FreeBSD passes only thread id, NetBSD passes process and
thread id.

Extend PT_LWPINFO operation in ptrace(2) to report suspended threads. In the
ptrace_lwpinfo structure in pl_event next to PL_EVENT_NONE and PL_EVENT_SIGNAL
add new value PL_EVENT_SUSPENDED.

Add new errno(2) value EDEADLK that might be returned by ptrace(2). It prevents
dead-locking in a scenario of resuming a process or thread that is prevented
from execution. This fixes bug that old API was vulnerable to this scenario.

Kernel bump delayed till introduction of PT_GETDBREGS/PT_SETDBREGS soon.

Add new ATF tests:
- resume1
Verify that a thread can be suspended by a debugger and later
resumed by the debugger

- suspend1
Verify that a thread can be suspended by a debugger and later
resumed by a tracee

- suspend2
Verify that the while the only thread within a process is
suspended, the whole process cannot be unstopped

Sponsored by <The NetBSD Foundation>
 1.59 12-Feb-2017  kamil Introduce new interface in ptrace(2) - PT_GET_SIGMASK and PT_SET_SIGMASK

Add new interface to add ability to get/set signal mask of a tracee.
It has been inspired by Linux PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, but
adapted for NetBSD API.

This interface is used for checkpointing software to set/restore context
of a process including signal mask like criu or just to track this property
in reverse-execution software like Record and Replay Framework (rr).


Add new ATF tests for this interface
 1.58 27-Jan-2017  wiz Spelling fixes.
 1.57 25-Jan-2017  kamil Make the PIOD_READ_AUXV operation more clear

Describe how to set piod_offs.

Sponsored by <The NetBSD Foundation>
 1.56 15-Jan-2017  kamil Fix one markup issue and add initial HISTORY section

Import HISTORY notes from FreeBSD.

Sponsored by <The NetBSD Foundation>
 1.55 14-Jan-2017  wiz branches: 1.55.2;
Wording, macro use.
 1.54 14-Jan-2017  kamil Document PTRACE_LWP_CREATE and PTRACE_LWP_EXIT in ptrace(2)

Sponsored by <The NetBSD Foundation>
 1.53 14-Jan-2017  kamil Document PTRACE_VFORK and PTRACE_VFORK_DONE in ptrace(2)

PTRACE_VFORK - report vfork(2)-like operations and trace child
PTRACE_VFORK_DONE - report unblocking the parent after vfork(2)-like call

Note that PTRACE_VFORK is currently unimplemented and returns ENOTSUP.

Sponsored by <The NetBSD Foundation>
 1.52 11-Jan-2017  kamil Correct man-page category of posix_spawn: is (3) not (2)
 1.51 11-Jan-2017  kamil Document SIGTRAP with si_code TRAP_CHLD in ptrace(2)

Document the current behavior of TRAP_CHILD in NetBSD.
Add more notes on PTRACE_FORK events.

Sponsored by <The NetBSD Foundation>
 1.50 07-Jan-2017  kamil Add more notes explaining how debuggers work on NetBSD

Explain:
- execve(2) handling and behavior, SIGTRAP & TRAP_EXEC
- reference PaX MPROTECT restrictions for debuggers
- software breakpoints handling and behavior, SIGTRAP & TRAP_BKPT
- single step behavior, SIGTRAP & TRAP_TRACE
- list predefined MI symbols for help debuggers in port specific headers
- explain that PT_TRACE_ME does not send a SIGSTOP signal

Sponsored by <The NetBSD Foundation>
 1.49 07-Jan-2017  kamil Document PT_SET_SIGINFO and PT_GET_SIGINFO in ptrace(2)

PT_SET_SIGINFO - fake signal information emitted to tracee
PT_GET_SIGINFO - read signal information routed to tracee

Sponsored by <The NetBSD Foundation>
 1.48 07-Jan-2017  kamil Fix swapped text between PT_GET_PROCESS_STATE and PT_GET_EVENT_MASK

Sponsored by <The NetBSD Foundation>
 1.47 07-Jan-2017  kamil ptrace(2): Document addr and data argument usage for PT_GET_PROCESS_STATE


The PT_GET_PROCESS_STATE call in ptrace(2) has the following usage of addr
and data:

A pointer to this structure is passed in addr. The data
argument should be set to sizeof(struct ptrace_event).

Sponsored by <The NetBSD Foundation>
 1.46 29-Dec-2016  kamil Reference siginfo(2) for a SIGCHLD signal

siginfo(2) describes appropriate signal specific information for SIGCHLD.

Sponsored by <The NetBSD Foundation>
 1.45 19-Dec-2016  abhinav Be consistent in using process' (vs process's).
 1.44 15-Dec-2016  kamil ptrace(2): Document PT_GETVECREGS and PT_SETVECREGS (ppc ports specific)

Sponsored by <The NetBSD Foundation>
 1.43 15-Dec-2016  kamil ptrace(2): Document PT_GETXMMREGS and PT_SETXMMREGS (i386 port specific)

Sponsored by <The NetBSD Foundation>
 1.42 15-Dec-2016  kamil ptrace(2): Remove dead text, some of it commented in this file for years

For example PT_READ_U/PT_WRITE_U has been removed by <mycroft> in 19950126.

Sponsored by <The NetBSD Foundation>
 1.41 10-Dec-2016  kamil Remove outdated note in the PT_DUMPCORE call of the ptrace(2) man-page

Currently the PT_DUMPCORE call requires process to be stopped, therefore it
no longer need to warn about stoped tracee to generate consistent data.

Sponsored by <The NetBSD Foundation>
 1.40 24-Nov-2016  kamil Remove duplicated PT_DUMPCORE description in machine-specific calls section

This function is part of the general ptrace(2) interface.

Sponsored by <The NetBSD Foundation>
 1.39 01-Nov-2016  wiz Bump date for previous.
 1.38 01-Nov-2016  kamil Document PT_SET_EVENT_MASK, PT_GET_EVENT_MASK and PT_GET_PROCESS_STATE

These descriptions are imported from OpenBSD.

Approved by <christos>

Sponsored by <The NetBSD Foundation>
 1.37 02-Jul-2015  christos branches: 1.37.2;
document PIOD_READ_AUXV.
 1.36 28-Jul-2014  christos PR/49045: Tetsuya Isaki: remove remaining caddr_t in ptrace(2)
 1.35 31-Aug-2011  jmcneill branches: 1.35.8; 1.35.18;
Document PT_SYSCALLEMU
 1.34 14-Apr-2010  jruoho Add offsets to the indentation in couple of places.
 1.33 06-Apr-2010  wiz New sentence, new line. Sort errors. Remove trailing whitespace.
 1.32 06-Apr-2010  christos PR/43128: Paul Koning: Threads support in ptrace() is insufficient for gdb to
debug threaded live apps: Add an optional lwpid in PT_STEP and PT_CONTINUE to
indicate which lwp to operate on, and implement the glue required to make it
work.
 1.31 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.30 12-Mar-2007  skrll Correct the struct name for PT_LWPINFO
 1.29 06-Mar-2007  drochner the "addr" argument to ptrace(2) is void* now
 1.28 11-Mar-2006  wiz Use more markup.
 1.27 06-Mar-2006  christos Add documentations for the 3 undocumented ptrace calls.
 1.26 09-Jan-2005  christos document PT_DUMPCORE.
 1.25 13-May-2004  wiz \- is a minus, not -.
 1.24 26-Jun-2003  wiz Fix typo in macro.
 1.23 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.22 31-Mar-2003  perry avaliable->available (Igor Sobrado, PR misc/19810)
 1.21 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.20 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.19 06-Apr-2002  nathanw The PT_IO operations are named PIOD_{READ,WRITE}_{I,D}, not
PIOD_OP_{READ,WRITE}_{I,D}.
 1.18 17-Mar-2002  thorpej Document PT_IO.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 11-Jan-2002  christos document that ptrace() will return EAGAIN if the process that we are trying
to ptrace is currently in execve().
 1.15 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 27-Sep-2000  nathanw branches: 1.13.2;
Note that we do support single-stepping, as a machine-dependant feature.
Don't be SPARC-specific about what features we support. Document how
to determine which requests are supported.
 1.12 24-Sep-2000  erh Mention additional restriction on ptrace: you can't ptrace system processes since the assumptions made for normal processes don't always hold (such as p_pptr is non-NULL).
 1.11 27-Jul-2000  jdolecek parameters addr & data are actually treated same way
for PT_DETACH and PT_CONTINUE - the only difference between them is that
the child is detached from the parent for PT_DETACH
 1.10 02-Dec-1999  kleink branches: 1.10.4;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 06-Oct-1999  jdolecek Add SEE ALSO section and xref sigaction(2) and signal(7)
 1.8 26-Mar-1999  sommerfe branches: 1.8.2; 1.8.4;
Document new chroot-related restrictions on fchdir, chroot, and ptrace
made possible by the kernel getcwd infrastructure
 1.7 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.6 09-Mar-1999  ross More missing .El's.
 1.5 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.4 08-Mar-1997  mouse alternate -> alternative, per PR 2643
 1.3 23-Feb-1996  jtc comment out PT_READ_U, PT_WRITE_U, PT_SYSCALL descriptions
 1.2 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.1 14-Nov-1994  deraadt ptrace(2) by der mouse; not checked for accuracy
 1.8.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.2.1 14-Jan-2002  he Pull up revision 1.16 (requested by he):
Fix a ptrace/execve race condition which could be used to modify
the child process' image during execve. This would be a security
issue due to setuid programs.
 1.10.4.2 12-Jan-2002  he Pull up revision 1.16 (requested by christos):
Fix a ptrace/execve race condition which could be used to modify
the child process' image during execve. This would be a security
issue due to setuid programs.
 1.10.4.1 30-Jul-2000  jdolecek pullup rev.1.11 from trunk (approved by thorpej):
PT_DETACH treats addr & data the same way as PT_CONTINUE, actually
 1.13.2.6 18-Oct-2002  nathanw Catch up to -current.
 1.13.2.5 25-Apr-2002  nathanw Catch up to -current.
 1.13.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.13.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.13.2.2 28-Jan-2002  nathanw Catch up to -current.
 1.13.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.35.18.1 10-Aug-2014  tls Rebase.
 1.35.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.2.4 26-Apr-2017  pgoyette Sync with HEAD
 1.37.2.3 20-Mar-2017  pgoyette Sync with HEAD
 1.37.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.37.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.55.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.67.2.1 06-Mar-2018  martin Pull up following revision(s) (requested by kamil in ticket #602):
doc/CHANGES{,.prev}: revision 1.138
sys/sys/ptrace.h: revision 1.63
lib/libc/sys/ptrace.2: revision 1.68
sys/kern/sys_ptrace_common.c: revision 1.35 (via patch)
tests/lib/libc/sys/t_ptrace_wait.c: revision 1.23

Remove PT_GET_SIGMASK / PT_SET_SIGMASK

These operations cloned Linux's specific PTRACE_GETSIGMASK /
PTRACE_SETSIGMASK.

This feature was useful in applications like rr/criu/reptyr-like, where
the ptrace(2) interface is abused for the purpose of constructing an
arbitrary
process. It's not reliable and not portable. For the NetBSD case it will =
be
better to invent something dedicated for serializing and deserializing a
process with threads.

Noted on tech-toolchain@ and blog entry
"LLDB restoration and return to ptrace(2)"
https://blog.netbsd.org/tnf/entry/lldb_restoration_and_return_to
 1.68.2.1 02-May-2018  pgoyette Synch with HEAD
 1.69.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.69.2.1 10-Jun-2019  christos Sync with HEAD
 1.79.2.1 15-Oct-2019  martin Pull up following revision(s) (requested by kamil in ticket #326):

lib/libc/sys/ptrace.2: revision 1.81

Document PT_STOP, update PT_KILL in the ptrace(2) man-page
Formatting by <mgorny>
 1.9 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.8 10-Nov-2006  christos branches: 1.8.8;
fix lint.
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.6 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.5 22-Jan-2000  mycroft branches: 1.5.6;
Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.4 15-Nov-1998  christos delint
 1.3 14-Oct-1998  kleink Need internal names for ftruncate(), lseek(), mmap(), pread() and pwrite().
 1.2 02-Jul-1998  thorpej int -> ssize_t ... today is not my day.
 1.1 02-Jul-1998  thorpej Wrappers around the indirected positional i/o system calls; the off_t
arguments must be padded.
 1.5.6.1 02-Aug-2002  nathanw Adapt to new syscall stub and weak name convention.
 1.8.8.1 09-Jan-2008  matt sync with HEAD
 1.7 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.6 23-Nov-2007  uebayasi branches: 1.6.30;
KNF; no variable name in function prototype.
 1.5 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.4 07-Aug-2003  agc branches: 1.4.22;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.3 15-Nov-1998  christos delint
 1.2 02-Jul-1998  thorpej int -> ssize_t ... today is not my day.
 1.1 02-Jul-1998  thorpej Wrappers around the indirected positional i/o system calls; the off_t
arguments must be padded.
 1.4.22.1 09-Jan-2008  matt sync with HEAD
 1.6.30.1 17-Apr-2012  yamt sync with head
 1.30 13-Feb-2012  dholland Quota-related docs fixes:

- Remove old quotactl(2); replace with new __quotactl(2).
- Document quota_getrestrictions(3), the semantic restriction codes,
and quota_quotaon/off(3).
- Update VFS_QUOTACTL(9), which was still describing the pre-proplib API.

Approved by releng for the freeze.
 1.29 25-Mar-2011  njoly branches: 1.29.4;
Add quotes for multi-words width string.
 1.28 06-Mar-2011  wiz Various fixes:
Remove trailing whitespace.
Sort sections.
Sort errors.
Fix typos.
Use more markup.
Probably something else I forgot.
 1.27 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.26 31-May-2010  njoly branches: 1.26.2;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.25 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.24 09-Oct-2008  christos branches: 1.24.4;
remove "limits" where it is not appropriate.
 1.23 13-May-2004  wiz \- is a minus, not -.
 1.22 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.21 27-Jun-2003  wiz SYNOPSIS is not a good place for C comments;
also, simplify macro usage.
 1.20 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.17 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.16 16-Sep-2001  wiz Boring whitespace fixes.
 1.15 17-Jun-2000  hubertf branches: 1.15.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.14 29-May-2000  jdolecek quotas are supported on lfs too, apparently
 1.13 02-Dec-1999  kleink branches: 1.13.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 29-Aug-1998  lukem branches: 1.12.6;
first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.11 02-Feb-1998  perry merge lite-2
 1.10 22-Oct-1996  explorer ufs/quota.h -> ufs/ufs/quota.h, and some instances of ufs -> ffs
closes pr misc/2842
 1.9 28-Sep-1996  christos Reflect reality.
 1.8 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.7 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.6 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.5 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.4 29-Nov-1993  jtc Fix formatting problem theo found.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.15.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.15.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.15.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.24.4.2 09-Oct-2008  christos remove "limits" where it is not appropriate.
 1.24.4.1 09-Oct-2008  christos file quotactl.2 was added on branch christos-time_t on 2008-10-09 14:40:12 +0000
 1.26.2.2 11-Feb-2011  bouyer Add pointers to source files using the quotactl interface
 1.26.2.1 11-Feb-2011  bouyer Describe the new quotactl interface
 1.29.4.1 17-Apr-2012  yamt sync with head
 1.13 29-Apr-2008  scw branches: 1.13.8;
- Document RAS_START_ASM, RAS_END_ASM, RAS_START_ASM_HIDDEN, and
RAS_END_ASM_HIDDEN.
- Advise against implementing RASs in C.

See PR lib/38482 for details.

While here, remove clauses 3 and 4 from TNF license.
 1.12 19-Sep-2006  wiz branches: 1.12.16;
Note that newer gcc require -fno-reorder-blocks.
Various other improvements. Bump date.
Based on a patch by skrll.
 1.11 15-Jan-2006  wiz branches: 1.11.2;
dd CAVEATS section provided by martin@ with minor cleanup by me.
 1.10 11-Jan-2004  mrg fix a typo
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 19-Jan-2003  jdolecek g/c the NEXTRELEASE comment tag now that the next version number is decided
 1.7 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.6 23-Oct-2002  jdolecek use .Nx 2.0 consistently in HISTORY section
add .\" NEXTRELEASE tag before the .Nx to make it possible to quickly
find version references in case this would need to be changed
 1.5 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.4 15-Sep-2002  gmcgarry branches: 1.4.2;
Add a disclaimer if using on a multiprocessor machine. Based on
comments by Bill Sommerfeld on tech-kern.
 1.3 01-Sep-2002  gmcgarry Document some more errors.
 1.2 29-Aug-2002  wiz Whitespace, mdoc, and grammar nits. Fix an Xr.
 1.1 28-Aug-2002  gmcgarry rasctl(2)
 1.4.2.4 11-Nov-2002  nathanw Catch up to -current
 1.4.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.4.2.1 15-Sep-2002  nathanw file rasctl.2 was added on branch nathanw_sa on 2002-09-17 21:32:54 +0000
 1.11.2.1 25-Sep-2006  riz Pull up following revision(s) (requested by skrll in ticket #182):
regress/sys/kern/ras/ras2/Makefile: revision 1.3
regress/sys/kern/ras/ras1/Makefile: revision 1.3
lib/libc/sys/rasctl.2: revision 1.12
Note that newer gcc require -fno-reorder-blocks.
Various other improvements. Bump date.
Based on a patch by skrll.
GCC 4 requires -fno-reorder-blocks to ensure that RAS_START/RAS_END
covers the right bits of code in these tests.
 1.12.16.1 18-May-2008  yamt sync with head.
 1.13.8.2 29-Apr-2008  scw - Document RAS_START_ASM, RAS_END_ASM, RAS_START_ASM_HIDDEN, and
RAS_END_ASM_HIDDEN.
- Advise against implementing RASs in C.

See PR lib/38482 for details.

While here, remove clauses 3 and 4 from TNF license.
 1.13.8.1 29-Apr-2008  scw file rasctl.2 was added on branch christos-time_t on 2008-04-29 21:06:29 +0000
 1.39 02-Sep-2019  sevan read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
 1.38 07-Aug-2019  wiz Remove leading zero in date.
 1.37 07-Aug-2019  roy read(2): Document ENOBUFS
 1.36 03-Jul-2017  wiz branches: 1.36.6; 1.36.8;
Remove workaround for ancient HTML generation code.
 1.35 14-Jul-2013  njoly Switch a few remaining system/pathname configuration variables from
"Dv {xxx}" to "Brq Dv xxx".
 1.34 12-Dec-2011  njoly branches: 1.34.6;
Start making fs read(2) fail with EISDIR if the implementation does
not allow read on directories (kernfs, rumpfs, ptyfs and sysvbfs).
Adjust man page accordingly, and add a small corresponding vfs
testcase.
 1.33 05-Apr-2010  wiz branches: 1.33.6;
Sort ERRORS section.
 1.32 03-Apr-2010  jruoho The functions read(), wait(), and write() appeared already in v2 UNIX.
 1.31 02-Aug-2007  wiz branches: 1.31.14;
Explicitly talk about file pointers (to avoid confusion with general C pointers).
Suggested by joerg.
Bump date.
 1.30 13-Oct-2006  wiz Make HTML-output safe.
 1.29 11-Oct-2006  elad Reword, based on changes from jmc@OpenBSD, thanks!
 1.28 07-Oct-2006  elad Add nit from rillig@ for PR/19603.
 1.27 13-May-2004  wiz \- is a minus, not -.
 1.26 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.25 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.24 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.23 02-Jan-2003  wiz Drop trailing spaces.
 1.22 30-Dec-2002  sommerfeld In EINTR description, add a crossreference to sigaction(2).
Put reference to "slow device" back in since filesystem & disk I/O, doesn't get
EINTR while pipes, sockets, ttys, etc., can.
 1.21 30-Dec-2002  grant clarify EINTR.

From Kevin P. Neal in PR misc/19603.
 1.20 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.19 10-Jul-2002  yamt import CAVEATS sections from OpenBSD.
with little tweak by me.
 1.18 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.17 16-Oct-2001  kleink Clean up synopsis somewhat:
* only associate S/G interfaces with <sys/uio.h> (and only that header);
* drop <sys/types.h> entirely, as it is no longer needed.
 1.16 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 02-Dec-1999  kleink branches: 1.14.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.13 22-Mar-1999  garbled branches: 1.13.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.11 03-Aug-1998  kleink UIO_MAXIOV -> IOV_MAX
 1.10 29-Jul-1998  thorpej Document that these calls can return EINVAL if the total length of the I/O
is more than can be expressed in the ssize_t return value.
 1.9 28-Jul-1998  is Mention poll(2), too, where we formerly only mentioned select(2).
 1.8 30-Jun-1998  thorpej Add pread(2), pwrite(2), preadv(2), pwritev(2) system calls.
 1.7 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 16-Sep-1994  mycroft Use an explicit references to UIO_MAXIOV, rather than a number. ref: PR 433
 1.4 25-Nov-1993  jtc branches: 1.4.2;
Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 05-Oct-1993  jtc Changed Synopsis, Buffer is of type "void *", not "char *".
The <unistd.h> header was allready correct.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 06-Oct-1994  mycroft Update from trunk.
 1.13.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.6.7 08-Jan-2003  thorpej Sync with HEAD.
 1.14.6.6 18-Oct-2002  nathanw Catch up to -current.
 1.14.6.5 01-Aug-2002  nathanw Catch up to -current.
 1.14.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.14.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.14.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.14.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.31.14.2 02-Aug-2007  wiz Explicitly talk about file pointers (to avoid confusion with general C pointers).
Suggested by joerg.
Bump date.
 1.31.14.1 02-Aug-2007  wiz file read.2 was added on branch matt-mips64 on 2007-08-02 23:46:40 +0000
 1.33.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.33.6.1 17-Apr-2012  yamt sync with head
 1.34.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.8.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.36.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.33 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.32 29-Jul-2013  wiz Bump date for previous.
 1.31 28-Jul-2013  njoly Add readlinkat(2) specific errors.
 1.30 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.29 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
While here, sort errors.
 1.28 01-Dec-2012  wiz Remove trailing whitespace.
 1.27 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.26 31-May-2010  njoly branches: 1.26.6; 1.26.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.25 13-May-2004  wiz \- is a minus, not -.
 1.24 11-May-2004  wiz Sort sections; use \*[Lt]\*[Gt] instead of <>.
 1.23 11-May-2004  kleink When using PATH_MAX in the example, make sure we include <limits.h>!
 1.22 11-May-2004  kleink Add an example code piece; suggested by Thomas Klausner.
 1.21 11-May-2004  wiz End sentence with a dot.
 1.20 10-May-2004  kleink While I'm at it: add restrict qualifiers to readlink(2).
 1.19 10-May-2004  kleink POSIX-2001: Change readlink(2)'s return type from int to ssize_t.
 1.18 07-Aug-2003  agc branches: 1.18.2;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.13 16-Sep-2001  wiz Boring whitespace fixes.
 1.12 02-Dec-1999  kleink branches: 1.12.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 27-Mar-1998  kleink Per X/Open CAE Spec Issue 5 Version 2, change the buffer size argument of
readlink() from type `int' to type `size_t'. This isn't an ABI change, since
the calling convention of our only LP64 platform (the Alpha) already promotes
this argument to a `long'.

This may not be the final action on this matter; readlink() still returns
an `int', which may change in a future revision of the standard.
 1.8 25-Mar-1997  mikel fix misplaced punctuation in SEE ALSO section.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.12.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.12.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.18.2.1 12-May-2004  jmc Pullup patch (requested by kleink in ticket #312)

Add an example code piece.
 1.26.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.12.2 25-Feb-2013  tls resync with head
 1.26.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.26.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.26.6.2 23-Jan-2013  yamt sync with head
 1.26.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.29 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.28 25-Feb-2010  wiz Uncomment crash(8) reference.
 1.27 04-Sep-2009  apb Add cross references to new boothowto(9) man page.
 1.26 06-Nov-2008  tsutsui branches: 1.26.2;
Comment out nonexistent crash(8) xref.
 1.25 13-Sep-2008  wiz Bump date for previous.
 1.24 11-Sep-2008  christos PR/39513: Stathis Kamperis: reboot(2) doesn't explicitly mention that combining
options is possible
Also remove RB_DFLTROOT.
 1.23 05-Aug-2006  wiz branches: 1.23.20;
Bump date for previous. Remove some Pp for consistency.
 1.22 05-Aug-2006  christos Update for Greg Woods. Add new options and mention the bit values together
with the options
 1.21 21-Nov-2004  jmmv Minor grammar fixes.
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.15 17-Aug-2002  yamt document RB_POWERDOWN.
from OpenBSD.
 1.14 06-Aug-2002  wiz Fix Fn (separate arguments).
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 02-Dec-1999  kleink branches: 1.12.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 14-Mar-1999  hubertf Fix RB_STRING, per PR 7147 by NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
 1.9 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.8 15-Jul-1997  mikel kadb(4) is dead, long live ddb(4)
remove obsolete BUGS section (hp300 supports RB_KDB, and apparently
nothing uses RB_DFLTROOT anymore)
 1.7 10-Aug-1996  mrg document RB_STRING.
 1.6 09-Aug-1996  mrg update for new reboot(2).
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 17-Sep-1994  mycroft vmunix --> netbsd
 1.3 25-Nov-1993  jtc branches: 1.3.2;
Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.3.2.1 06-Oct-1994  mycroft Update from trunk.
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.12.6.4 27-Aug-2002  nathanw Catch up to -current.
 1.12.6.3 13-Aug-2002  nathanw Catch up to -current.
 1.12.6.2 22-Mar-2002  nathanw Catch up to -current.
 1.12.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.23.20.1 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.26.2.2 06-Nov-2008  tsutsui Comment out nonexistent crash(8) xref.
 1.26.2.1 06-Nov-2008  tsutsui file reboot.2 was added on branch christos-time_t on 2008-11-06 16:23:57 +0000
 1.41 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.40 03-Apr-2025  riastradh recv(2): This is not going to go away even if it is redundant.

(Language was from the original i386bsd import, probably dating back
to the '80s.)
 1.39 04-Aug-2019  uwe branches: 1.39.10;
Minor markup tweaks.
 1.38 19-Mar-2018  roy branches: 1.38.2;
socket: report receive buffer overflows

Add soroverflow() which increments the overflow counter, sets so_error
to ENOBUFS and wakes the receive socket up.
Replace all code that manually increments this counter with soroverflow().
Add soroverflow() to raw_input().

This allows userland to detect route(4) overflows so it can re-sync
with the current state.
 1.37 11-Jun-2017  abhinav branches: 1.37.4;
Grammar and punctuation fixes in few sentences
Remove Pp before Bd at couple of places
 1.36 14-Jul-2013  njoly branches: 1.36.20;
Switch a few remaining system/pathname configuration variables from
"Dv {xxx}" to "Brq Dv xxx".
 1.35 23-Jun-2012  dholland branches: 1.35.2;
"appeared in", not "appeared on".
 1.34 22-Jun-2012  wiz Fix macro. Replace another one (there is no .Lx). Use full NetBSD version.
 1.33 22-Jun-2012  wiz Remove trailing whitespace. Use more markup. Bump date for previous.
 1.32 22-Jun-2012  christos {send,recv}mmsg glue
 1.31 01-Feb-2012  wiz Remove trailing whitespace. Bump date for previous.
 1.30 01-Feb-2012  manu Document when recv(2) returns 0
 1.29 27-Jun-2011  wiz branches: 1.29.2;
Various minor improvements.
 1.28 26-Jun-2011  christos * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.27 23-Apr-2006  wiz Improve description of msg_name and msg_namelen fields.
Addresses PR 33330 by Nils O. Selaasdal.
Use more markup.
 1.26 13-May-2004  wiz \- is a minus, not -.
 1.25 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.24 11-Jun-2003  wiz Adapt to current sys/socket.h. Noted by MAEKAWA Masahide in PR 21849.
 1.23 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.22 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.21 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.20 22-Oct-2001  kleink Sprinkle some __restrict into <sys/socket.h>.
 1.19 16-Oct-2001  kleink Remove inclusion of <sys/types.h> from synopsis; it is no longer needed.
 1.18 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.17 16-Sep-2001  wiz Boring whitespace fixes.
 1.16 02-Dec-1999  kleink branches: 1.16.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.15 23-Aug-1999  tron branches: 1.15.4;
Revert last change after Ross Harvey fixed "mandoc".
 1.14 23-Aug-1999  tron Use correct "mandoc" macro for concatenating "or" and "ing".
Fixes PR misc/8236 by "Wiz".
 1.13 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 10-Feb-1999  kleink Reflect the addition of socklen_t.
 1.11 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.10 04-Aug-1998  kleink Per XNS Issue 5, calling recvmsg(2) or sendmsg(2) with an msg.msg_iovlen less
than or equal to 0 shall fail with EMSGSIZE; the latter condition was not being
checked for. Also, document the msg.msg_iovlen > {IOV_MAX} case.
 1.9 29-Jul-1998  thorpej Document that these calls can return EINVAL if the total length of the I/O
is more than can be expressed in the ssize_t return value.
 1.8 28-Jul-1998  is Mention poll(2), too, where we formerly only mentioned select(2).
 1.7 18-Jul-1998  lukem use AF_LOCAL instead of AF_UNIX
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 10-Jan-1994  jtc Fix spelling errors.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.15.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.16.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.16.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.16.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.29.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.29.2.2 30-Oct-2012  yamt sync with head
 1.29.2.1 17-Apr-2012  yamt sync with head
 1.35.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.20.1 09-Apr-2018  bouyer Pull up following revision(s) (requested by roy in ticket #724):
tests/net/icmp/t_ping.c: revision 1.19
sys/netinet6/raw_ip6.c: revision 1.166
sys/netinet6/ip6_input.c: revision 1.195
sys/net/raw_usrreq.c: revision 1.59
sys/sys/socketvar.h: revision 1.151
sys/kern/uipc_socket2.c: revision 1.128
tests/lib/libc/sys/t_recvmmsg.c: revision 1.2
lib/libc/sys/recv.2: revision 1.38
sys/net/rtsock.c: revision 1.239
sys/netinet/udp_usrreq.c: revision 1.246
sys/netinet6/icmp6.c: revision 1.224
tests/net/icmp/t_ping.c: revision 1.20
sys/netipsec/keysock.c: revision 1.63
sys/netinet/raw_ip.c: revision 1.172
sys/kern/uipc_socket.c: revision 1.260
tests/net/icmp/t_ping.c: revision 1.22
sys/kern/uipc_socket.c: revision 1.261
tests/net/icmp/t_ping.c: revision 1.23
sys/netinet/ip_mroute.c: revision 1.155
sbin/route/route.c: revision 1.159
sys/netinet6/ip6_mroute.c: revision 1.123
sys/netatalk/ddp_input.c: revision 1.31
sys/netcan/can.c: revision 1.3
sys/kern/uipc_usrreq.c: revision 1.184
sys/netinet6/udp6_usrreq.c: revision 1.138
tests/net/icmp/t_ping.c: revision 1.18
socket: report receive buffer overflows
Add soroverflow() which increments the overflow counter, sets so_error
to ENOBUFS and wakes the receive socket up.
Replace all code that manually increments this counter with soroverflow().
Add soroverflow() to raw_input().
This allows userland to detect route(4) overflows so it can re-sync
with the current state.
socket: clear error even when peeking
The error has already been reported and it's pointless requiring another
recv(2) call just to clear it.
socket: remove now incorrect comment that so_error is only udp
As it can be affected by route(4) sockets which are raw.
rtsock: log dropped messages that we cannot report to userland
Handle ENOBUFS when receiving messages.
Don't send messages if the receiver has died.
Sprinkle more soroverflow().
Handle ENOBUFS in recv
Handle ENOBUFS in sendto
Note value received. Harden another sendto for ENOBUFS.
Handle the routing socket overflowing gracefully.
Allow a valid sendto .... duh
Handle errors better.
Fix test for checking we sent all the data we asked to.
 1.37.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.38.2.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.39.10.1 02-Aug-2025  perseant Sync with HEAD
 1.34 14-Feb-2025  dholland rename.2: clarify behavior of overlapping renames

It came up today that on case-insensitive filesystems, rename("FOO",
"foo") unlinks the file. That's obviously not what we want, so it's a
bug. In the course of the ensuing discussion it developed that the
description in the man page was at least vague and possibly vaguely
wrong. This commit fixes that.

Bump date.
 1.33 27-Jan-2015  wiz branches: 1.33.28;
Remove superfluous comma.
 1.32 28-Jul-2013  njoly Add renameat(2) specific errors.
 1.31 28-Jul-2013  wiz Fix punctuation formatting and sort errors.
 1.30 28-Jul-2013  njoly Adjust EFAULT error description to use arguments name from synopsis.
 1.29 30-Jun-2013  wiz Fix second problem noted by Henning Petersen in PR 47975:
renameat is in unistd.h. Bump date.
 1.28 30-Jun-2013  wiz Fix typo in SYNOPSIS. From Henning Petersen in PR 47975.
 1.27 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.26 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.25 01-Dec-2012  wiz Remove trailing whitespace.
 1.24 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.23 31-May-2010  njoly branches: 1.23.6; 1.23.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.22 27-Dec-2005  chs change errors returned for various operations on "/" to conform to SUSv3.
as discussed on tech-kern some time back.
 1.21 13-May-2004  wiz \- is a minus, not -.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.17 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 17-May-2001  matt replace return with rename (from Bruce Korb).
 1.12 17-Jun-2000  hubertf branches: 1.12.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.11 02-Dec-1999  kleink branches: 1.11.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 22-Mar-1999  garbled branches: 1.10.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.8 24-May-1998  kleink Add a comment about the deviation from POSIX and how to use the compatibility
interface.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.12.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.12.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.12.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.12.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.23.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.12.2 25-Feb-2013  tls resync with head
 1.23.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.23.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.6.2 23-Jan-2013  yamt sync with head
 1.23.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.33.28.1 02-Aug-2025  perseant Sync with HEAD
 1.16 11-Nov-2014  njoly Do not hardcode values for ENAMETOOLONG, use symblic constants.
 1.15 08-Jul-2011  wiz Sort error descriptions.
 1.14 03-Jul-2011  jruoho But use .Xr (and not .Fn) with references to external functions.
 1.13 03-Jul-2011  jruoho Use .Fn (and not .Nm) for functions.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.9 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.8 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 07-Jun-2000  nathanw branches: 1.7.4;
Fix incorrect uses of indicate/indicates/indicated for each other.
 1.6 02-Dec-1999  kleink branches: 1.6.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.5 24-Mar-1999  hubertf branches: 1.5.6;
Better explain possible EBADF causes.
Patches submitted by Greg A. Woods <woods@planix.com> in PR lib/7206.
 1.4 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.3 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.2 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.1 07-May-1994  jtc branches: 1.1.1;
Initial revision
 1.1.1.1 07-May-1994  jtc 44lite code
 1.5.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.7.4.2 22-Mar-2002  nathanw Catch up to -current.
 1.7.4.1 08-Mar-2002  nathanw Catch up to -current.
 1.22 11-Oct-2014  njoly Note that rmdir(2) fails with EINVAL when the path last component is
`.' (dot).
 1.21 11-Oct-2014  njoly Use '.Rv -std' for RETURN VALUES, sort ERRORS.
 1.20 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.19 13-May-2004  wiz \- is a minus, not -.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 17-Jun-2000  hubertf branches: 1.13.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.12 02-Dec-1999  kleink branches: 1.12.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.8 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.13.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.5 13-Mar-2022  andvar s/hander/handler/ and s/hader/header/ in comments and documentation.
 1.4 14-Mar-2004  yamt "Upcall handlers should be registered" -> "An upcall handler ..."
as only one handler can be registered.
 1.3 14-Mar-2004  wiz Begin sentences with uppercase letters.
 1.2 14-Mar-2004  snj Minor English nits.
 1.1 14-Mar-2004  yamt some manpages of scheduler activation syscalls.
 1.2 14-Mar-2004  snj Fix macro usage, use Dv for SA_FLAG_STACKINFO, and English nits.
 1.1 14-Mar-2004  yamt some manpages of scheduler activation syscalls.
 1.4 05-Sep-2005  yamt sync with kernel.
 1.3 14-Mar-2004  yamt branches: 1.3.6;
"Upcall handlers should be registered" -> "An upcall handler ..."
as only one handler can be registered.
 1.2 14-Mar-2004  snj English improvements.
 1.1 14-Mar-2004  yamt some manpages of scheduler activation syscalls.
 1.3.6.1 04-Oct-2005  tron Pull up following revision(s) (requested by yamt in ticket #844):
lib/libc/sys/sa_setconcurrency.2: revision 1.4
sync with kernel.
 1.6 12-Dec-2004  snj Bump date for last.
 1.5 12-Dec-2004  yamt document correct return value. PR/28571 from ITOH Yasufumi.
 1.4 14-Mar-2004  yamt "Upcall handlers should be registered" -> "An upcall handler ..."
as only one handler can be registered.
 1.3 14-Mar-2004  wiz Begin sentences with uppercase letters.
 1.2 14-Mar-2004  snj English fix.
 1.1 14-Mar-2004  yamt some manpages of scheduler activation syscalls.
 1.5 13-Mar-2022  andvar s/hander/handler/ and s/hader/header/ in comments and documentation.
 1.4 09-May-2004  yamt - note its typical usage.
- bump date.
 1.3 14-Mar-2004  wiz Begin sentences with uppercase letters.
 1.2 14-Mar-2004  snj Fix macro usage and a slight English problem.
 1.1 14-Mar-2004  yamt some manpages of scheduler activation syscalls.
 1.6 04-Jan-2018  kamil Add bunch of missing includes of namespace.h in libc

The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change eliminates usage of the global changes of the following symbols:
- strlcat -> _strlcat
- sysconf -> __sysconf
- closedir -> _closedir
- fparseln -> _fparseln
- kill -> _kill
- mkstemp -> _mkstemp
- reallocarr -> _reallocarr
- strcasecmp -> _strcasecmp
- strncasecmp -> _strncasecmp
- strptime -> _strptime
- strtok_r -> _strtok_r
- sysctl -> _sysctl
- dlopen -> __dlopen
- dlclose -> __dlclose
- dlsym -> __dlsym

Sponsored by <The NetBSD Foundation>
 1.5 16-Dec-2017  christos PR/52826: Onno van der Linden: Return PRI_NONE for sched_get_priority_m{in,ax}
and SCHED_OTHER.
 1.4 18-Mar-2012  christos branches: 1.4.24;
fail as the man page says sched_rr_get_interval should.
 1.3 13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.2 31-Oct-2008  rmind branches: 1.2.2; 1.2.10;
Add sched_getaffinity_np() and sched_setaffinity_np() wrappers, mainly
for compatibility purposes.
 1.1 02-Jul-2008  rmind branches: 1.1.2; 1.1.6;
Move scheduling functions from librt to libc.
Fixes PR/38657.
 1.1.6.1 12-Nov-2008  snj Pull up following revision(s) (requested by rmind in ticket #47):
lib/libc/sys/sched.c: revision 1.2
include/sched.h: revision 1.11
Add sched_getaffinity_np() and sched_setaffinity_np() wrappers, mainly
for compatibility purposes.
 1.1.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.1 02-Jul-2008  wrstuden file sched.c was added on branch wrstuden-revivesa on 2008-09-18 04:39:23 +0000
 1.2.10.1 17-Apr-2012  yamt sync with head
 1.2.2.2 31-Oct-2008  rmind Add sched_getaffinity_np() and sched_setaffinity_np() wrappers, mainly
for compatibility purposes.
 1.2.2.1 31-Oct-2008  rmind file sched.c was added on branch christos-time_t on 2008-10-31 00:29:20 +0000
 1.4.24.1 23-Jun-2018  martin Pull up following revision(s) (requested by maya in ticket #892):

lib/libc/sys/sched.c: revision 1.5

PR/52826: Onno van der Linden: Return PRI_NONE for sched_get_priority_m{in,ax}
and SCHED_OTHER.
 1.46 09-Sep-2024  riastradh select(2): Cite standards conformance in man page.

(Should we cite the earliest standard, or the most recent standard,
if they're the same as far as anyone has noticed?)

PR standards/49999: the history and standards conformance of
pselect(2) is not documented
 1.45 01-Aug-2023  gutteridge branches: 1.45.2;
select.2: note when pselect(2) was added
 1.44 07-Jul-2023  riastradh select(2), poll(2): Clarify return values.
 1.43 25-Oct-2017  abhinav branches: 1.43.14;
Add FD_SET, FD_CLR, FD_ISSET and FD_ZERO to the NAME section
 1.42 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.41 28-Nov-2013  khorben The document date was not updated as it should have been.
 1.40 28-Nov-2013  khorben Fixed a typo in the example code for select(2)
 1.39 04-Apr-2013  wiz pull over agc's typo fix from agc-symver branch.
 1.38 05-Apr-2010  joerg branches: 1.38.6; 1.38.12; 1.38.18;
\\ -> \e
 1.37 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.36 19-Oct-2008  wiz branches: 1.36.4;
Improve wording. Use Bd -literal for code sample.
 1.35 18-Oct-2008  rmind - Recommend poll(2) instead of select(2).
- Update example code a little bit.
 1.34 17-Aug-2008  dholland Fix grammar. Noted by Taylor R Campbell in PR 39369.
 1.33 25-May-2008  wiz New sentence, new line.
 1.32 25-May-2008  wiz Sort sections. Sort ERRORS. Prepare for HTML output.
 1.31 23-Feb-2008  sborrill branches: 1.31.2; 1.31.4;
Fix tiny typo
 1.30 29-May-2007  manu branches: 1.30.4; 1.30.8;
Try to make select(2) man page more insightful, by providing an example.
Based on contribution form Jean-Yves Migeon <Jean-Yves.Migeon@bde.espci.fr>
 1.29 09-Mar-2005  kleink nil pointer -> null pointer
 1.28 07-Mar-2005  wiz Bump date for previous.
 1.27 05-Mar-2005  kleink Provide select() and pselect() prototypes in <sys/select.h>, per
1003.1-2001, and leave the select() prototype in <unistd.h> for
compatibility. To allow for transition, reorganization of this is
deferred until netbsd-3 gets branched.
 1.26 03-Mar-2005  kleink Normalize the declarations of the FD_* "functions".
 1.25 28-Feb-2005  wiz Bump date for pselect.
 1.24 26-Feb-2005  matt Build syscalls stubs for pselect and pollts. Update man pages.
 1.23 13-May-2004  wiz \- is a minus, not -.
 1.22 14-Oct-2003  wiz & -> \*[Am]; mark up FD_SETSIZE; bump date for previous.
 1.21 14-Oct-2003  itojun note that programs that use rpc(3) cannot bump FD_SETSIZE.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.17 10-Aug-2002  wiz Remove an unnecessary .Ns.
 1.16 10-Aug-2002  itojun bring in openbsd BUGS section (modulo some strong wording). nroff nits
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.13 16-Sep-2001  wiz Boring whitespace fixes.
 1.12 02-Dec-1999  kleink branches: 1.12.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 08-Jun-1998  lukem fix up case of function names
 1.9 01-Nov-1997  mycroft Nuke trailing comma in SEE ALSO section.
 1.8 11-Jul-1997  mikel xref getdtablesize(3) not getdtablesize(2)
 1.7 07-Sep-1996  mycroft Cross-reference poll(2).
 1.6 07-Sep-1996  mycroft Document EFAULT as a valid error.
 1.5 27-Jun-1995  cgd branches: 1.5.6;
fix typo, as pointed out by David Brownlee
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.5.6.1 10-Dec-1996  mycroft From trunk:
Document EFAULT as a possible errno value.
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.4 13-Aug-2002  nathanw Catch up to -current.
 1.12.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.12.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.12.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.30.8.1 24-Mar-2008  keiichi sync with head.
 1.30.4.1 23-Mar-2008  matt sync with HEAD
 1.31.4.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.31.4.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.31.2.1 04-Jun-2008  yamt sync with head
 1.36.4.2 19-Oct-2008  wiz Improve wording. Use Bd -literal for code sample.
 1.36.4.1 19-Oct-2008  wiz file select.2 was added on branch christos-time_t on 2008-10-19 16:54:20 +0000
 1.38.18.1 03-Apr-2013  agc correct a typo
 1.38.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.38.12.1 23-Jun-2013  tls resync from head
 1.38.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.43.14.1 11-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #946):

lib/libc/sys/poll.2: revision 1.38
lib/libc/sys/select.2: revision 1.44
lib/libc/sys/select.2: revision 1.45
lib/libc/sys/select.2: revision 1.46

select(2), poll(2): Clarify return values.

select.2: note when pselect(2) was added

select(2): Cite standards conformance in man page.
(Should we cite the earliest standard, or the most recent standard,
if they're the same as far as anyone has noticed?)

PR standards/49999: the history and standards conformance of
pselect(2) is not documented
 1.45.2.1 02-Aug-2025  perseant Sync with HEAD
 1.21 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.20 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.19 21-Jun-2009  wiz Sort errors.
 1.18 21-Jun-2009  dholland Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.17 06-May-2008  njoly branches: 1.17.6; 1.17.8; 1.17.12; 1.17.14;
- Make semctl SETVAL/SETALL commands validate the semaphore value to
be set, which needs to be in the range [0,SEMVMX].
- Adjust the man page.
 1.16 13-May-2004  wiz branches: 1.16.10; 1.16.20; 1.16.24;
\- is a minus, not -.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 02-Oct-2002  wiz argument with g, operation with e.
 1.12 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.9 16-Sep-2001  wiz Boring whitespace fixes.
 1.8 02-Dec-1999  kleink branches: 1.8.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 25-Aug-1999  thorpej branches: 1.7.4;
Update for XSH5.
 1.6 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 28-Apr-1998  fair fix mdoc references
 1.4 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.3 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.2 27-Mar-1997  mikel branches: 1.2.2;
cleanup xrefs
 1.1 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 and 1.4 up from trunk (mikel)
 1.7.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.8.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.8.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.8.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.16.24.1 18-May-2008  yamt sync with head.
 1.16.20.1 18-Aug-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1351):
lib/libc/sys/shmctl.2: revision 1.20
lib/libc/sys/semctl.2: revision 1.18
Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.16.10.1 18-Aug-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1351):
lib/libc/sys/shmctl.2: revision 1.20
lib/libc/sys/semctl.2: revision 1.18
Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.17.14.1 21-Apr-2010  matt sync to netbsd-5
 1.17.12.1 14-Aug-2009  snj Pull up following revision(s) (requested by dholland in ticket #894):
lib/libc/sys/semctl.2: revision 1.18
lib/libc/sys/shmctl.2: revision 1.20
Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.17.8.2 06-May-2008  njoly - Make semctl SETVAL/SETALL commands validate the semaphore value to
be set, which needs to be in the range [0,SEMVMX].
- Adjust the man page.
 1.17.8.1 06-May-2008  njoly file semctl.2 was added on branch christos-time_t on 2008-05-06 20:25:10 +0000
 1.17.6.1 14-Aug-2009  snj Pull up following revision(s) (requested by dholland in ticket #894):
lib/libc/sys/semctl.2: revision 1.18
lib/libc/sys/shmctl.2: revision 1.20
Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.18 29-Jan-2015  joerg Remove va_arg hack for Clang/PPC.
 1.17 13-Aug-2014  joerg Use the lint path as workaround for Clang on 32bit PPC for now.
Document this hack.
 1.16 10-Aug-2014  joerg If LINT code path uses memcpy, it should also include string.h.
 1.15 16-Jan-2009  christos branches: 1.15.14;
don't use glue for semctl, the number of underscores makes this an intractable
problem :-) Use regular wrappers like we do with sigtimedwait.
 1.14 15-Jan-2009  christos fix the semctl glue build that worked before by chance by side effects of
building the the assembly stub as a normal stub. Just build it as a glue
stub.
 1.13 11-Jan-2009  christos merge christos-time_t
 1.12 13-Sep-2005  christos branches: 1.12.14;
compat core reorg.
 1.11 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.10 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.9 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.8 14-Jun-2000  cgd branches: 1.8.4;
sweep of my licenses (userland files w/o only my copyright) for
consistency. (no functional changes)
 1.7 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.6 22-Jan-2000  mycroft branches: 1.6.2;
Delint.
 1.5 25-Aug-1999  thorpej Add __msgctl13(), __semctl13(), and __shmctl13() (symbols are __RENAME()'d
in their respective header files). Add PSEUDO stubs for the old versions
of these system calls.

Note that __semctl13() doesn't require the extra stub that the old
semctl()/__semctl() did, as the SUSv2 version takes variable arguments,
and thus does not require the extra indirection.
 1.4 13-Jul-1997  christos Fix RCSID's
 1.3 27-Feb-1995  cgd clean up merge, fix Id's
 1.2 27-Feb-1995  cgd clean up RCS Id's
 1.1 20-Oct-1994  cgd branches: 1.1.2;
make the sysv functions real syscalls.
 1.1.2.1 18-Apr-1995  jtc #include "namespace.h"
 1.6.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.8.4.1 21-Jun-2002  nathanw Catch up to -current.
 1.12.14.2 08-Nov-2008  christos new files for time_t
 1.12.14.1 13-Sep-2005  christos file semctl.c was added on branch christos-time_t on 2008-11-08 21:49:36 +0000
 1.15.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18 08-Oct-2006  rillig Added a reference to ipcs(1), since that's where one can find out more
about the semaphore limits in case of [ENOSPC].
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 13-May-2004  kleink Like in shmget(2), elaborate on IPC_EXCL in the description.
 1.15 16-Apr-2003  wiz branches: 1.15.2;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.10 16-Sep-2001  wiz Boring whitespace fixes.
 1.9 12-Dec-2000  briggs branches: 1.9.2;
Add a cross-reference to ftok(3).
 1.8 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 25-Aug-1999  thorpej branches: 1.7.4;
Update for XSH5.
 1.6 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 06-Mar-1999  drochner fix a number of pastos (msgflg where semflg is meant)
 1.4 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.3 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.2 27-Mar-1997  mikel branches: 1.2.2;
cleanup xrefs
 1.1 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 and 1.4 up from trunk (mikel)
 1.7.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.9.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.9.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.9.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.15.2.1 14-May-2004  tron Pull up revision 1.16 (requested by kleink in ticket #327):
Like in shmget(2), elaborate on IPC_EXCL in the description.
 1.18 03-Oct-2024  christos new semtimedop(2) GSoC 2024 (Shivraj Jamgade)
 1.17 22-Mar-2010  joerg branches: 1.17.58;
Use .In for header files instead of .Ar Pa and variations.
 1.16 03-Nov-2005  chs update errors for EIDRM (which we've returned for a long time now).
 1.15 13-May-2004  wiz branches: 1.15.2;
\- is a minus, not -.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.11 05-Mar-2002  tv Historic typo: "unfo" -> "undo"
 1.10 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.9 16-Sep-2001  wiz Boring whitespace fixes.
 1.8 02-Dec-1999  kleink branches: 1.8.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 25-Aug-1999  thorpej branches: 1.7.4;
Update for XSH5.
 1.6 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 09-Mar-1999  ross More missing .El's.
 1.4 07-May-1998  kleink Various SysV IPC prototype changes.
 1.3 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.2 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.1 16-Oct-1995  jtc branches: 1.1.8;
SysV IPC manpages from Frank van der Linden
 1.1.8.1 28-Nov-1997  mellon Pull rev 1.2 and 1.3 up from trunk (mikel)
 1.7.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.8.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.8.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.8.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.15.2.1 05-Nov-2005  tron Pull up following revision(s) (requested by chs in ticket #930):
lib/libc/sys/semop.2: revision 1.16
update errors for EIDRM (which we've returned for a long time now).
 1.17.58.1 02-Aug-2025  perseant Sync with HEAD
 1.34 10-Dec-2021  andvar s/occured/occurred/ in comments, log messages and man pages.
 1.33 28-Mar-2021  dholland Document EINVAL for out of range socket address lengths.

This is what happens, but wasn't documented. Applies to bind(2),
connect(2), and send(2).
 1.32 11-Jun-2017  abhinav Insert missing word
Insert comma in a sentence to make the comprehension easier
Remove Pp before Bd
 1.31 14-Jul-2013  njoly Switch a few remaining system/pathname configuration variables from
"Dv {xxx}" to "Brq Dv xxx".
 1.30 22-Jun-2012  wiz branches: 1.30.2;
Replace nonexistant Lx macro. Use full NetBSD version for Nx.
 1.29 22-Jun-2012  wiz Remove trailing whitespace. Sort errors. Bump date for previous.
 1.28 22-Jun-2012  christos {send,recv}mmsg glue
 1.27 09-May-2008  christos branches: 1.27.2; 1.27.6;
add more errors from gleaning the source.
 1.26 11-May-2006  christos branches: 1.26.18; 1.26.20;
Document more MSG_ flags. From FreeBSD
 1.25 13-May-2004  wiz \- is a minus, not -.
 1.24 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.23 24-Apr-2003  wiz Bump date for last.
 1.22 20-Apr-2003  christos PR/7004: Jonathan Stone: Document that sendto(2) can fail with EISCONN
 1.21 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.20 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.19 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.18 16-Oct-2001  kleink Remove inclusion of <sys/types.h> from synopsis; it is no longer needed.
 1.17 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.16 16-Sep-2001  wiz Boring whitespace fixes.
 1.15 02-Dec-1999  kleink branches: 1.15.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.14 22-Mar-1999  garbled branches: 1.14.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.13 10-Feb-1999  kleink Reflect the addition of socklen_t.
 1.12 30-Sep-1998  hwr Fixes kern/6216 by me.
 1.11 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.10 04-Aug-1998  kleink Per XNS Issue 5, calling recvmsg(2) or sendmsg(2) with an msg.msg_iovlen less
than or equal to 0 shall fail with EMSGSIZE; the latter condition was not being
checked for. Also, document the msg.msg_iovlen > {IOV_MAX} case.
 1.9 29-Jul-1998  thorpej Document that these calls can return EINVAL if the total length of the I/O
is more than can be expressed in the ssize_t return value.
 1.8 28-Jul-1998  is Mention poll(2), too, where we formerly only mentioned select(2).
 1.7 25-Mar-1997  is Added EHOSTUNREACH description to ERRORS, closing PR 3133.
 1.6 15-Jan-1996  thorpej Document the EACCES errno value as returned by sendmsg(2), per
Ted Mellon <mellon@fugue.com>, PR #1093.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.14.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.15.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.15.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.15.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.26.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.26.18.1 18-May-2008  yamt sync with head.
 1.27.6.2 09-May-2008  christos add more errors from gleaning the source.
 1.27.6.1 09-May-2008  christos file send.2 was added on branch christos-time_t on 2008-05-09 15:52:51 +0000
 1.27.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.2.1 30-Oct-2012  yamt sync with head
 1.30.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19 14-Jul-2013  njoly Switch a few remaining system/pathname configuration variables from
"Dv {xxx}" to "Brq Dv xxx".
 1.18 13-Oct-2006  wiz branches: 1.18.42; 1.18.48;
Sort SEE ALSO.
 1.17 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.16 13-May-2004  wiz \- is a minus, not -.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 19-Apr-1994  jtc Add curly braces around NGROUPS_MAX.
This convention is used in manpages for other UN*X systems to refer to
system values (availiable via sysconf() or pathconf()) rather than
definitions in <limits.h>.
 1.5 15-Apr-1994  jtc Describe causes of EINVAL error.
NGROUPS -> NGROUPS_MAX.
 1.4 29-Mar-1994  jtc Last weekend's gid_t changes allow us to change the gidset argument of
getgroups() and setgroups() from a int ptr to a gid_t ptr.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.18.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.24 16-Mar-2022  dholland setpgid.2: Mention that both child and parent need to call it.

Absence of this standard info was noticed by riastradh@.
 1.23 19-Sep-2014  wiz Sort sections. From Henning Petersen in PR 49222.
 1.22 13-May-2004  wiz \- is a minus, not -.
 1.21 17-Dec-2003  wiz Bump date for previous (hi christos!).
 1.20 17-Dec-2003  christos Say what happens with pgrp == 0.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 02-Dec-1999  kleink branches: 1.14.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.13 22-Mar-1999  garbled branches: 1.13.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.11 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.10 14-Jul-1997  kleink branches: 1.10.2;
Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.9 27-Mar-1997  mikel make setpgid(pid, pgrp) return EINVAL if pgrp < 0 as required by POSIX.1;
from Klaus Klein in PR standards/3395.
 1.8 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.7 02-May-1994  jtc Correctly describe conditions of ESRCH & EACCESS errors
 1.6 10-Jan-1994  jtc Fix spelling errors.
 1.5 15-Dec-1993  jtc More manpage tweaks.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.2.1 28-Nov-1997  mellon Pull rev 1.11 up from trunk (mikel)
 1.13.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.14.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.14.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.23 02-May-2008  martin branches: 1.23.8;
Move TNF licenses to 2 clause form
 1.22 13-May-2004  wiz branches: 1.22.24;
\- is a minus, not -.
 1.21 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.20 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 05-Jan-2001  mycroft branches: 1.14.2;
Update the date.
 1.13 05-Jan-2001  mycroft Update the date.
 1.12 05-Jan-2001  mycroft Mark these as deprecated, and correctly an error in the HISTORY section.
 1.11 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 22-Mar-1999  garbled branches: 1.10.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9 15-Aug-1998  mycroft Assign my copyrights to TNF.
 1.8 25-Feb-1998  perry The parameters of setregid are gid_t, not int.
 1.7 20-Sep-1997  mikel RCSid police
 1.6 23-Jun-1996  mycroft branches: 1.6.6;
Resurrect the setre[ug]id() stubs.
 1.5 23-Jun-1996  mycroft Clean up removed files.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.6.2 10-Dec-1996  mycroft From trunk:
Implement setre[ug]id() for real.
 1.6.6.1 23-Jun-1996  mycroft file setregid.2 was added on branch netbsd-1-2 on 1996-12-10 08:17:28 +0000
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.14.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.14.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.14.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.24.1 18-May-2008  yamt sync with head.
 1.23.8.2 02-May-2008  martin Move TNF licenses to 2 clause form
 1.23.8.1 02-May-2008  martin file setregid.2 was added on branch christos-time_t on 2008-05-02 18:11:06 +0000
 1.23 02-May-2008  martin branches: 1.23.8;
Move TNF licenses to 2 clause form
 1.22 13-May-2004  wiz branches: 1.22.24;
\- is a minus, not -.
 1.21 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.20 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.19 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.18 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 05-Jan-2001  mycroft branches: 1.14.2;
Update the date.
 1.13 05-Jan-2001  mycroft Update the date.
 1.12 05-Jan-2001  mycroft Mark these as deprecated, and correctly an error in the HISTORY section.
 1.11 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 22-Mar-1999  garbled branches: 1.10.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.9 15-Aug-1998  mycroft Assign my copyrights to TNF.
 1.8 25-Feb-1998  perry parameters to setreuid are uid_t, not int.
 1.7 20-Sep-1997  mikel RCSid police
 1.6 23-Jun-1996  mycroft branches: 1.6.6;
Resurrect the setre[ug]id() stubs.
 1.5 23-Jun-1996  mycroft Clean up removed files.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.6.2 10-Dec-1996  mycroft From trunk:
Implement setre[ug]id() for real.
 1.6.6.1 23-Jun-1996  mycroft file setreuid.2 was added on branch netbsd-1-2 on 1996-12-10 08:17:29 +0000
 1.10.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.14.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.14.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.14.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.24.1 18-May-2008  yamt sync with head.
 1.23.8.2 02-May-2008  martin Move TNF licenses to 2 clause form
 1.23.8.1 02-May-2008  martin file setreuid.2 was added on branch christos-time_t on 2008-05-02 18:11:06 +0000
 1.15 04-Apr-2011  jruoho Use .Fn for functions.
 1.14 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.13 13-May-2004  wiz \- is a minus, not -.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.9 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.8 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 02-Dec-1999  kleink branches: 1.7.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.6 22-Jul-1997  mikel branches: 1.6.8;
xref setpgid(2), not nonexistent setpgid(3)
 1.5 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.4 29-May-1997  cgd Fix broken uses of Dd. Both the mdoc and mdoc.samples pages agree:
.Dd is supposed to be invoked like:
.Dd month day, year
e.g. ".Dd January 25, 1989", rather than:
.Dd "month day, year"
which is what these pages did.
 1.3 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.2 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.1 15-Apr-1994  jtc branches: 1.1.1;
First cut at a setsid(2) manual page.
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.6.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.6.3 21-Jun-2002  nathanw Catch up to -current.
 1.7.6.2 22-Mar-2002  nathanw Catch up to -current.
 1.7.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.14 15-Oct-2011  christos close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
fopen(db, "re")
 1.13 11-Jan-2009  christos merge christos-time_t
 1.12 23-Nov-2007  uebayasi branches: 1.12.14;
KNF; no variable name in function prototype.
 1.11 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.10 07-Oct-2006  kardel branches: 1.10.8;
- simplify code
- remove any 'permission checks' via geteuid() - with upcoming
security models these might not match the model any more
- this also fixes a bug where ntp_adjtime() was denied (EPERM)
even though only a legit read status was performed
 1.9 17-Aug-2006  jnemeth PR/34218 -- Matt Fleming -- date hangs when root trys to set time
backwards while at securelevel >= 2
 1.8 09-Mar-2006  christos Do not use SCARG() in userland. Eliminates need for <sys/systm.h>.
 1.7 12-Jun-2005  lukem Add missing __RCSID()
 1.6 27-Apr-2004  kleink POSIX-2001: Add restrict keywords to gettimeofday(2) and setitimer(2);
further deprecate struct timezone usage by changing `tzp' argument to
gettimeofday() to void *; align utimes(2) declaration by changing `times`
argument from struct timeval * to struct timeval[2]. From Murray
Armfield in PR standards/25331.

In due curse, reflect these changes in futimes(2), lutimes(2), and
settimeofday(2).
 1.5 16-Jul-2003  cb Mark __clockctl_fd close-on-exec to avoid unintentionally leaking
time setting privileges across an exec.
 1.4 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.3 09-Dec-2001  manu - Changed clocktl interface to use syscallargs structures
- Implemented keep-state so that we don't have to open /dev/clockctl each time.
 1.2 17-Sep-2001  thorpej branches: 1.2.2;
Need string.h for memcpy() prototype.
 1.1 16-Sep-2001  manu Added support to use the clockctl driver if present for adjtime(),
clock_settime(), ntp_adjtime() and settimeofday(). The super-user still
always use the plain system call.
Approved by Christos
 1.2.2.3 28-Jan-2002  nathanw Catch up to -current.
 1.2.2.2 08-Oct-2001  nathanw Catch up to -current.
 1.2.2.1 17-Sep-2001  nathanw file settimeofday.c was added on branch nathanw_sa on 2001-10-08 20:22:07 +0000
 1.10.8.1 09-Jan-2008  matt sync with HEAD
 1.12.14.1 08-Nov-2008  christos time_t changes
 1.23 02-Sep-2019  sevan setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
 1.22 05-Apr-2010  wiz branches: 1.22.46; 1.22.48;
Fix date.
 1.21 03-Apr-2010  jruoho Add some history.
 1.20 13-Oct-2006  wiz Sort SEE ALSO.
 1.19 07-Oct-2006  elad PR/23152: Matthew Mondor: Minor improvements to section 2 man pages for
NetBSD 1.6.1

Well we're long gone from NetBSD 1.6.1 but I adapted the patch to -current
as it seemed reasonable. Thanks for submitting!
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 14-Apr-2003  wiz Bump date, remove an article.
 1.15 14-Apr-2003  jdolecek seteuid() and setegid() were adopted in IEEE Std 1003.1-2001 + X/Open
portability guide issue 6, adjust headers to expose the function
prototypes with appropriate _POSIX_C_SOURCE/_XOPEN_SOURCE defines
fixes standards/21136 by MAEKAWA Masahide
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 17-Aug-2002  yamt note that setgid doesn't change supplementary groupids.
from openbsd.
 1.12 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.9 16-Sep-2001  wiz Boring whitespace fixes.
 1.8 28-Dec-1999  mjl branches: 1.8.6;
Fix typo.
 1.7 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.6 22-Mar-1999  garbled branches: 1.6.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.4 21-May-1996  mycroft Describe the _POSIX_SAVED_IDS situation more clearly.
 1.3 27-Feb-1995  cgd branches: 1.3.6;
merge with lite, keeping most local changes. clean up Ids
 1.2 10-Apr-1994  cgd light clean
 1.1 06-Apr-1994  cgd branches: 1.1.1;
M-x shuffle-functions-and-documentation
basically, move things around so documentation is in the correct place,
and bump appropriate functions into the 'compat' section.
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.3.6.1 10-Dec-1996  mycroft From trunk:
State explicitly why we do not implement _POSIX_SAVED_IDS.
 1.6.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.6.5 27-Aug-2002  nathanw Catch up to -current.
 1.8.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.8.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.8.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.8.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.48.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.22.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.18 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.13 16-Jun-2002  wiz Add Xrefs to ipcs(1) and ipcrm(1).
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Boring whitespace fixes.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 25-Aug-1999  thorpej branches: 1.9.4;
Update for XSH5.
 1.8 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.7 09-Mar-1999  ross More missing .El's.
 1.6 27-Jul-1998  drochner Partly revert 1.3->1.4: shmat() does really return -1 on error.
Fixes PR lib/5835 (yasufu-i@is.aist-nara.ac.jp).
 1.5 07-May-1998  kleink Various SysV IPC prototype changes.
 1.4 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.3 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.2 27-Mar-1997  mikel branches: 1.2.2;
cleanup xrefs
 1.1 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.2.2.2 27-Jul-1998  mellon Pull up 1.4 and 1.5 (drochner)
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 and 1.4 up from trunk (mikel)
 1.9.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.10.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.21 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.20 21-Jun-2009  dholland Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.19 31-Dec-2006  uebayasi branches: 1.19.18; 1.19.24; 1.19.26;
Whitespace.
 1.18 23-Dec-2006  wiz Sort errors; use Dv; s/=A0/ /
 1.17 25-Nov-2006  christos branches: 1.17.2; 1.17.6;
PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory
 1.16 13-May-2004  wiz \- is a minus, not -.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 16-Jun-2002  wiz Add Xrefs to ipcs(1) and ipcrm(1).
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.10 16-Sep-2001  wiz Boring whitespace fixes.
 1.9 02-Dec-1999  kleink branches: 1.9.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.8 25-Aug-1999  thorpej branches: 1.8.4;
Update for XSH5.
 1.7 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.6 28-Apr-1998  fair fix mdoc references
 1.5 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.4 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.3 27-Mar-1997  mikel branches: 1.3.2;
cleanup xrefs
 1.2 22-Dec-1996  cgd fix bogon: <sys/shm.h>, not <sys/msg.h>, should be included to use this.
 1.1 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.3.2.1 28-Nov-1997  mellon Pull rev 1.4 and 1.5 up from trunk (mikel)
 1.8.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.9.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.9.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.9.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.17.6.1 18-Aug-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1351):
lib/libc/sys/shmctl.2: revision 1.20
lib/libc/sys/semctl.2: revision 1.18
Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.17.2.1 18-Aug-2009  bouyer Pull up following revision(s) (requested by dholland in ticket #1351):
lib/libc/sys/shmctl.2: revision 1.20
lib/libc/sys/semctl.2: revision 1.18
Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.19.26.1 21-Apr-2010  matt sync to netbsd-5
 1.19.24.1 14-Aug-2009  snj Pull up following revision(s) (requested by dholland in ticket #894):
lib/libc/sys/semctl.2: revision 1.18
lib/libc/sys/shmctl.2: revision 1.20
Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.19.18.1 14-Aug-2009  snj Pull up following revision(s) (requested by dholland in ticket #894):
lib/libc/sys/semctl.2: revision 1.18
lib/libc/sys/shmctl.2: revision 1.20
Fix pastos. From Jukka Salmi in PR 41605, with a very minor adjustment.
 1.22 27-Oct-2008  wiz branches: 1.22.4;
Sort ERRORS, use more markup, bump date for previous.
Remove trailing whitespace.
 1.21 27-Oct-2008  erh Document the fact that shmget can return EINVAL.
Refer the reader over to sysctl for information about changing shm limits.
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 13-May-2004  kleink Repair sentence in previous.
 1.18 13-May-2004  kleink * Undo rev. 1.9, most of which was either redundant, inaccurate, or wrong.
* Elaborate on IPC_EXCL in the description.
 1.17 16-Apr-2003  wiz branches: 1.17.2;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 16-Jun-2002  wiz Add Xrefs to ipcs(1) and ipcrm(1).
 1.14 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.13 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 25-Aug-2001  mjl Fix typo mentioned in OpenBSD PR/2032
 1.10 12-Dec-2000  briggs branches: 1.10.2;
Add a cross-reference to ftok(3).
 1.9 26-Jun-2000  assar add documentation of `shmflg'
See PR bin/10431
 1.8 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 25-Aug-1999  thorpej branches: 1.7.4;
Update for XSH5.
 1.6 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 14-Mar-1999  kristerw EACESS -> EACCES. From OpenBSD.
 1.4 07-May-1998  kleink Various SysV IPC prototype changes.
 1.3 27-Nov-1997  mikel fix typos, use -mdoc macros where useful, replace blank lines with .Pp
 1.2 27-Mar-1997  mikel branches: 1.2.2;
cleanup xrefs
 1.1 16-Oct-1995  jtc SysV IPC manpages from Frank van der Linden
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 up from trunk (mikel)
 1.7.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.2.4 21-Jun-2002  nathanw Catch up to -current.
 1.10.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.10.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.10.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.17.2.2 14-May-2004  tron Pull up revision 1.19 (requested by kleink in ticket #327):
Repair sentence in previous.
 1.17.2.1 14-May-2004  tron Pull up revision 1.18 (requested by kleink in ticket #327):
* Undo rev. 1.9, most of which was either redundant, inaccurate, or wrong.
* Elaborate on IPC_EXCL in the description.
 1.22.4.2 27-Oct-2008  wiz Sort ERRORS, use more markup, bump date for previous.
Remove trailing whitespace.
 1.22.4.1 27-Oct-2008  wiz file shmget.2 was added on branch christos-time_t on 2008-10-27 16:49:11 +0000
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 17-Aug-2002  yamt bring in HISTORY from openbsd.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 29-Dec-1999  tron branches: 1.11.6;
Correct typo reported by Jens Nilsson in PR misc/9069.
 1.10 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.2; 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 07-Jun-1998  enami Rename section DIAGNOSTICS to RETURN VALUES as descirbed in mdoc.samples(7).
While I'm here, sort some SEE ALSO section and uncapitalize symbol name.
 1.7 27-Apr-1998  kleink Fail with errno set to EINVAL if `how' is invalid. Also, reorder error list.
 1.6 25-Apr-1998  kleink 0 -> SHUT_RD, 1 -> SHUT_WR, 2 -> SHUT_RDWR.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.2.1 08-Jan-2000  he Pull up revision 1.11 (requested by tron):
Correct typo. Fixes PR#9069.
 1.11.6.3 27-Aug-2002  nathanw Catch up to -current.
 1.11.6.2 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.53 18-Dec-2024  christos Explain SA_ONSTACK better.
 1.52 21-May-2022  dholland branches: 1.52.4;
fix typo in sigaction(2)
 1.51 22-May-2018  wiz Remove reference to itself.
 1.50 22-May-2018  kamil Minor improvement in sigaction(2)

Note that SIGCHLD covers process continued event.

Sponsored by <The NetBSD Foundation>
 1.49 25-Jul-2016  wiz branches: 1.49.12;
Remove one of the two SEE ALSO sections.
 1.48 09-Jul-2016  dholland branches: 1.48.2;
Dump the list of async-signal-safe functions here. It belongs in
programmer-facing docs, not user-facing docs, so shouldn't be in
signal(7).
 1.47 01-Nov-2015  wiz Fix macro. Remove trailing whitespace.
 1.46 31-Oct-2015  christos mention what we are allowed to do.
 1.45 04-Jan-2014  wiz Merge EINVAL descriptions.
 1.44 14-Oct-2012  dholland typo
 1.43 03-Jun-2006  christos branches: 1.43.44; 1.43.50;
Document SA_NOKERNINFO.
 1.42 30-Mar-2005  christos mention that SIG_IGN on SIGCHLD does not produce zombies.
 1.41 22-Mar-2005  kleink Add restrict qualifiers to remaining <signal.h> function arguments.
 1.40 13-Jun-2004  lha Add list of async-signal-safe functions
Approved by wiz
 1.39 25-Nov-2003  christos - Document NO_DEFER
- Turn sa_flags into a list to make it easier to find/read
- Sort the sa_flags lists.
 1.38 14-Oct-2003  wiz Move siginfo(5) and ucontext(5) to siginfo(2) and ucontext(2) resp.,
and fix references.
Per a discussion on source-changes around Sep 14 2003.
 1.37 10-Sep-2003  wiz Add semicolons when enumerating variables (looks more natural);
new sentence, new line; sort SEE ALSO.
 1.36 10-Sep-2003  christos Reflect reality after siginfo changes.
 1.35 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.34 11-May-2003  kleink Rather than printing the definition of struct sigaction literally,
change the description to name its members. This has the effect
of discouraging (non-portable) structure assignments of struct
sigaction, as well as making life easier when sa_sigaction is added.
 1.33 11-May-2003  kleink As prompted by Thomas Klausner, add a sentence on sigset_t and sigsetops()
to the introduction.
 1.32 24-Apr-2003  wiz Bump date for last.
 1.31 20-Apr-2003  christos PR/7572: John F. Woods: document EINVAL caused by bogus flags in struct
sigaction.
 1.30 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.29 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.28 15-Jul-2002  jdolecek Remove sa_sigaction member of struct sigaction, accidentaly added here
in rev. 1.26.
Problem pointed out by Antti Kantee.
 1.27 08-Feb-2002  ross branches: 1.27.2;
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.26 23-Nov-2001  jdolecek remove the list of Berkeley-specific signals from STANDARDS
section, the whole list is available in signal(7)
 1.25 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.24 07-Jun-2000  nathanw branches: 1.24.4;
Fix incorrect uses of indicate/indicates/indicated for each other.
 1.23 11-Dec-1999  msaitoh branches: 1.23.2;
use .Er
 1.22 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.21 06-Oct-1999  jdolecek remove the list of signals and xref signal(7) instead
 1.20 18-Sep-1998  christos branches: 1.20.4;
Add NOCLDWAIT documentation.
 1.19 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.18 11-Jul-1998  mrg be specific about the sa_mask structure (ie, actually refer to it by name)
 1.17 05-May-1998  tls document SA_RESETHAND. From Eric Haszlakiewicz, erh@uaccess.net
 1.16 30-Apr-1998  fair fix .Xr reference
 1.15 28-Apr-1998  fair fix mdoc references
 1.14 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.13 01-Nov-1997  mycroft Minor wording changes, and update the date.
 1.12 01-Nov-1997  mycroft Refer to sigaltstack(2), not sigstack(2).
Do not refer to siginterrupt(3), which is part of the old sigvec interface.
Various other formatting and wording fixes.
 1.11 16-Oct-1997  christos branches: 1.11.2;
Reflect current reality.
 1.10 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.9 27-Mar-1997  mikel allow examination of SIGKILL and SIGSTOP signal handlers (but still
disallow changes); from Klaus Klein in PR standards/3398.
 1.8 17-Jan-1997  perry change sigpause(2) to sigsuspend(2) or sigpause(3), depending
Also try to fix other bad references to sig* man pages.
Fixes pr-2885 from Jonathan Stone
These SEE ALSO sections are still bloody messes (sigh)
 1.7 12-Oct-1995  jtc Manpage fixes from Jochen Pohl. Aligns the prototypes in the SYNOPSIS
section with the actual function declarations. See PR #1589 for details.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 17-Oct-1994  cgd either change or update references to sigvec(), as appropriate
 1.4 15-Dec-1993  jtc branches: 1.4.2;
Add explicit return types and needed header files to SYNOPSIS section.
 1.3 15-Oct-1993  jtc Use .Xr for SEE ALSO cross references.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 17-Oct-1994  cgd from trunk.
 1.11.2.1 01-Nov-1997  mellon Pull rev 1.12 and 1.13 up from trunk (mycroft)
 1.20.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.23.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.24.4.5 01-Aug-2002  nathanw Catch up to -current.
 1.24.4.4 22-Mar-2002  nathanw Catch up to -current.
 1.24.4.3 08-Mar-2002  nathanw Catch up to -current.
 1.24.4.2 28-Jan-2002  nathanw Catch up to -current.
 1.24.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.27.2.1 15-Jul-2002  thorpej pullup-1-6 ticket #510 (jdolecek).

Original log message:
Remove sa_sigaction member of struct sigaction, accidentaly added here
in rev. 1.26.
Problem pointed out by Antti Kantee.
 1.43.50.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.43.50.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.43.44.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.43.44.1 30-Oct-2012  yamt sync with head
 1.48.2.1 26-Jul-2016  pgoyette Sync with HEAD
 1.49.12.1 25-Jun-2018  pgoyette Sync with HEAD
 1.52.4.1 02-Aug-2025  perseant Sync with HEAD
 1.26 01-Nov-2021  thorpej Don't mention the "struct sigaltstack" name of "stack_t".
 1.25 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.24 27-Sep-2014  njoly Fix synopsis, remove unneeded Pp macro before display block and add one
before prototype. While here, use "Rv -std" for RETURN VALUES.
 1.23 02-Mar-2012  joerg Drop obsolete incompatibility note for interaction with libpthread.
 1.22 16-Apr-2009  wiz branches: 1.22.6;
Add CAVEATS section:
Due to limitations in the current pthread implementation, makecontext(3)
and sigaltstack(2) should not be used in programs which link against
libpthread (whether threads are used or not).

Wording from drochner@ and ad@

Bump date for man pages.

Add note in libpthread/README so it's not forgotten to update the man
pages when the problem is fixed.
 1.21 22-Mar-2005  kleink branches: 1.21.26; 1.21.30;
Add restrict qualifiers to remaining <signal.h> function arguments.
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 11-Aug-2003  drochner correct an assertion about minimum stack size: MINSIGSTKSZ is sufficient
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 11-Dec-1999  msaitoh branches: 1.13.6;
use .Er
 1.12 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 06-Oct-1999  jdolecek xref signal(7)
 1.10 12-May-1999  sommerfe branches: 1.10.2;
s/sigstack/sigaltstack/ in ERRORS section
 1.9 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 02-Feb-1998  perry merge lite-2
 1.6 26-Nov-1997  kleink Update sigaltstack() to use stack_t parameters.
 1.5 20-Sep-1997  mikel reference SS_* constants, not SA_* constants; from der Mouse in PR lib/4117
add some whitespace
 1.4 08-Mar-1997  mouse alternate -> alternative, per PR 2643
 1.3 27-Feb-1995  cgd clean up RCS Id's
 1.2 13-Jun-1994  jtc Change manpage's struct sigaltstack definition to match the one in
<sys/signal.h>. Fixes bug 283.
 1.1 07-May-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 02-Feb-1998  perry import lite-2
 1.1.1.1 07-May-1994  cgd new syscalls
 1.10.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.21.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.21.26.1 25-Apr-2009  snj Pull up following revision(s) (requested by rmind in ticket #727):
lib/libc/gen/makecontext.3: revision 1.6
lib/libc/sys/sigaltstack.2: revision 1.22
lib/libpthread/pthread.3: revision 1.11
Add CAVEATS section:
Due to limitations in the current pthread implementation, makecontext(3)
and sigaltstack(2) should not be used in programs which link against
libpthread (whether threads are used or not).
Wording from drochner@ and ad@
Bump date for man pages.
 1.22.6.1 17-Apr-2012  yamt sync with head
 1.3 13-Sep-2005  christos compat core reorg.
 1.2 12-Jun-2005  lukem Add missing __RCSID()
 1.1 29-Nov-1997  kleink Modify the recent sigaltstack() interface change to use the __RENAME() scheme;
add __sigaltstack14().
 1.15 24-Oct-2008  wiz branches: 1.15.4;
Fix pasto in previous.
 1.14 24-Oct-2008  christos PR/39796: Robert Elz: Document that sigpending can return EFAULT since it calls
copyout.
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.12 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.11 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.10 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.9 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 09-Jul-2001  skrll grammar.
 1.7 07-Jun-2000  nathanw branches: 1.7.4;
Fix incorrect uses of indicate/indicates/indicated for each other.
 1.6 02-Dec-1999  kleink branches: 1.6.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.5 06-Oct-1999  jdolecek xref signal(7)
 1.4 14-Jul-1997  kleink branches: 1.4.6;
Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.3 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.2 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.1 27-Feb-1995  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.4.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.7.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.7.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.7.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.15.4.2 24-Oct-2008  wiz Fix pasto in previous.
 1.15.4.1 24-Oct-2008  wiz file sigpending.2 was added on branch christos-time_t on 2008-10-24 15:40:22 +0000
 1.22 07-Jan-2006  kleink Xref pthread_sigmask(3).
 1.21 06-Jan-2006  uwe Make "When set is null" into a separate paragraph for better readability.
 1.20 22-Mar-2005  kleink Add restrict qualifiers to remaining <signal.h> function arguments.
 1.19 23-Nov-2004  kleink Remove references to the header SIG_* are located in altogether;
<sys/signal.h> exposed too much implementation detail, and <signal.h>
remains the sole header referenced by this page.
 1.18 25-Aug-2004  pooka The values for the parameter "how" are defined in sys/signal.h, not signal.h
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.12 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 07-Jun-2000  nathanw branches: 1.11.4;
Fix incorrect uses of indicate/indicates/indicated for each other.
 1.10 02-Dec-1999  kleink branches: 1.10.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 06-Oct-1999  jdolecek xref signal(7)
 1.8 14-Jul-1997  kleink branches: 1.8.6;
Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.7 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 04-Jan-1995  jtc sigmask() macro doesn't belong here, it's in the sigblock() manpage
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.11.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.11.4.2 22-Mar-2002  nathanw Catch up to -current.
 1.11.4.1 08-Mar-2002  nathanw Catch up to -current.
 1.5 30-Oct-2017  wiz Remove Tn
 1.4 25-Oct-2017  abhinav Add sigqueueinfo to the NAME section
 1.3 14-Feb-2013  wiz Fix typo in error code; from Henning Petersen in PR 47565.
While here, sort errors.
 1.2 10-Jan-2011  wiz branches: 1.2.6; 1.2.12;
Sort errors, fix xref, don't xref itself.
 1.1 10-Jan-2011  christos add sigqueue
 1.2.12.1 25-Feb-2013  tls resync with head
 1.2.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 10-Jan-2011  christos remove clauses 3/4
 1.1 10-Jan-2011  christos add sigqueue
 1.17 26-Mar-2004  drochner sigreturn() isn't officially supported anymore; remove its manpage
(which was outdated anyway)
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Boring whitespace fixes.
 1.11 02-Dec-1999  kleink branches: 1.11.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 06-Oct-1999  jdolecek xref signal(7)
 1.9 22-Mar-1999  garbled branches: 1.9.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 17-Oct-1994  cgd either change or update references to sigvec(), as appropriate
 1.4 29-Nov-1993  jtc branches: 1.4.2;
Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 17-Oct-1994  cgd from trunk.
 1.9.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.9 06-Mar-2002  wiz Add SYNOPSIS.
 1.8 16-Sep-2001  wiz Boring whitespace fixes.
 1.7 06-Oct-1999  jdolecek branches: 1.7.8;
xref signal(7)
 1.6 22-Mar-1999  garbled branches: 1.6.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 27-Feb-1995  cgd resurrect man page, only to note deprecation; belongs elsewhere (where?)
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.8.3 22-Mar-2002  nathanw Catch up to -current.
 1.7.8.2 08-Mar-2002  nathanw Catch up to -current.
 1.7.8.1 08-Oct-2001  nathanw Catch up to -current.
 1.17 13-May-2004  wiz \- is a minus, not -.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.11 11-Dec-1999  msaitoh branches: 1.11.6;
use .Er
 1.10 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 06-Oct-1999  jdolecek xref signal(7)
 1.8 29-Aug-1998  lukem branches: 1.8.4;
first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 28-Apr-1998  fair fix mdoc references
 1.6 02-Feb-1998  perry merge lite-2
 1.5 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 13-Jun-1994  jtc User's should #include <signal.h>, not <sys/signal.h> if they want to
use this function portably.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.8 02-Apr-2012  agc fix a couple of typos
 1.7 31-May-2010  drochner branches: 1.7.6;
another POSIX compliance fix: sigwait(3) should not use errno but
return the error code directly
 1.6 30-May-2010  drochner -fix internal use of sigwaitinfo(2) by sigwait(3): The former returns
the signal number now, as required by POSIX. The latter should just
return 0 on success. Fixes a mysql problem reported by Kurt Schreiner.
-document the new behavior of sigwaitinfo and sigtimedwait
-retain non-POSIX behavior for NetBSD-5 binary compatibility -- the fix
would likely not be polled into the .0-branches, and having 5.0.x and
5.x behave differently would be confusing. Besides that, it was
documented in the manpage all the time.
 1.5 25-Feb-2009  ad Remove pointless AUTHORS sections. The names are in the source and CVS
history along with everyone else who has contributed.
 1.4 30-Apr-2008  martin branches: 1.4.8; 1.4.10;
Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.30;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 03-Mar-2003  wiz Grammar improvements and some minor mdoc fixes.
 1.1 15-Feb-2003  jdolecek add POSIX sigtimedwait(), sigwaitinfo(), sigwait() - wait for queued signals

note these are for non-threaded programs only - libpthread will provide
it's own thread-aware wrapper
 1.3.30.1 18-May-2008  yamt sync with head.
 1.4.10.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.4.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4.8.1 30-Apr-2008  martin file sigtimedwait.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.7.6.1 17-Apr-2012  yamt sync with head
 1.3 11-Jan-2009  christos merge christos-time_t
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Feb-2003  jdolecek branches: 1.1.30;
add POSIX sigtimedwait(), sigwaitinfo(), sigwait() - wait for queued signals

note these are for non-threaded programs only - libpthread will provide
it's own thread-aware wrapper
 1.1.30.1 18-May-2008  yamt sync with head.
 1.2.8.2 08-Nov-2008  christos time_t changes
 1.2.8.1 28-Apr-2008  christos file sigtimedwait.c was added on branch christos-time_t on 2008-11-08 21:45:38 +0000
 1.5 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.4 31-May-2010  drochner branches: 1.4.6;
another POSIX compliance fix: sigwait(3) should not use errno but
return the error code directly
 1.3 30-May-2010  drochner -fix internal use of sigwaitinfo(2) by sigwait(3): The former returns
the signal number now, as required by POSIX. The latter should just
return 0 on success. Fixes a mysql problem reported by Kurt Schreiner.
-document the new behavior of sigwaitinfo and sigtimedwait
-retain non-POSIX behavior for NetBSD-5 binary compatibility -- the fix
would likely not be polled into the .0-branches, and having 5.0.x and
5.x behave differently would be confusing. Besides that, it was
documented in the manpage all the time.
 1.2 28-Apr-2008  martin branches: 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Feb-2003  jdolecek branches: 1.1.30;
add POSIX sigtimedwait(), sigwaitinfo(), sigwait() - wait for queued signals

note these are for non-threaded programs only - libpthread will provide
it's own thread-aware wrapper
 1.1.30.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file sigwait.c was added on branch christos-time_t on 2008-04-28 20:23:01 +0000
 1.4.6.1 17-Apr-2012  yamt sync with head
 1.3 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.2 28-Apr-2008  martin branches: 1.2.4; 1.2.8;
Remove clause 3 and 4 from TNF licenses
 1.1 15-Feb-2003  jdolecek branches: 1.1.30;
add POSIX sigtimedwait(), sigwaitinfo(), sigwait() - wait for queued signals

note these are for non-threaded programs only - libpthread will provide
it's own thread-aware wrapper
 1.1.30.1 18-May-2008  yamt sync with head.
 1.2.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2.8.1 28-Apr-2008  martin file sigwaitinfo.c was added on branch christos-time_t on 2008-04-28 20:23:01 +0000
 1.2.4.1 17-Apr-2012  yamt sync with head
 1.52 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.51 28-Jul-2023  wiz branches: 1.51.2;
Remove Pp that have no effect.
 1.50 20-Jul-2023  gutteridge socket.2: simplify and improve some phrasing
 1.49 08-Jun-2023  uwe socket(2): change type flags list back to -tag

On second thought, convert the list of type flags back to -tag, but
don't make it -compact. This way it's easier to see that it's related
to the list above.
 1.48 06-Jun-2023  uwe socket(2): fix macro invocation in a column
 1.47 06-Jun-2023  uwe socket(2): use "provides" consistently in "type" descriptions
 1.46 06-Jun-2023  uwe socket(2): use .Bl -column where appropriate
 1.45 06-Jun-2023  riastradh socket(2): Move prose list of socket type summaries into a table.
 1.44 06-Jun-2023  riastradh socket(2): Tidy up markup a bit.

Use a tag list, not a literal block with hand-formatted text, for
protocols and socket type flags.
 1.43 28-Jun-2022  rillig fix references in manual pages to the reference documentation
 1.42 27-May-2017  bouyer merge the bouyer-socketcan branch to HEAD.

CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.
 1.41 01-Mar-2013  joerg branches: 1.41.16;
Retire OSI network stack. OK core@
 1.40 05-Feb-2013  joerg Remove remnants of AF_IMPLINK.
 1.39 25-Jan-2012  wiz branches: 1.39.6;
Bump date for previous.
 1.38 25-Jan-2012  christos As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]
 1.37 26-Jun-2011  christos branches: 1.37.2;
* Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.36 06-Sep-2007  jnemeth PR/36933 - Robert Elz -- ARPA IPv6 -> IPv6
 1.35 02-Mar-2007  wiz branches: 1.35.4;
Bump date for previous.
 1.34 20-Feb-2007  plunky Add PF_BLUETOOTH to list of supported protocol families
 1.33 13-Jun-2006  ginsbach branches: 1.33.4; 1.33.6;
Add EAFNOSUPPORT as a possible error if the address family is not
supported. This adds further differentiation between which argument to
socket(2) caused the error. No longer are invalid domain (address family)
errors classified as ENOPROTOSUPPORT errors. This should make socket(2)
conform to current POSIX and X/Open standards. Fixes PR/33676.
 1.32 13-Jun-2006  ginsbach Sort ERRORS. Bump date.
 1.31 03-Nov-2004  jmmv branches: 1.31.2;
Add missing colon symbol after sentence.
 1.30 13-May-2004  wiz \- is a minus, not -.
 1.29 31-Mar-2004  pooka Pipes aren't "full-duplex byte streams", so don't compare SOCK_STREAM
type sockets to them.
 1.28 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.27 15-May-2003  wiz Point to IPC tutorials in /usr/share/doc/psd, update names, and add authors.
Bump date.
Suggested by kleink.
 1.26 01-May-2003  wiz a -> an from jmc@openbsd. Add a comma while here.
 1.25 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.24 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.23 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.22 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.21 16-Oct-2001  kleink Remove inclusion of <sys/types.h> from synopsis; it is no longer needed.
 1.20 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.19 16-Sep-2001  wiz Boring whitespace fixes.
 1.18 05-Oct-2000  ad branches: 1.18.2;
insure -> ensure
 1.17 22-May-2000  itojun add PF_INET6.
 1.16 11-Dec-1999  msaitoh use .Er
 1.15 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.14 24-Jun-1999  tron branches: 1.14.4;
Add missing reference to setsockopt(2) to "SEE ALSO" section.
 1.13 22-Mar-1999  garbled branches: 1.13.2;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.11 01-Aug-1998  thorpej Protocol Family (PF_*) constants are used to select the domain,
not Address Family (AF_*).
 1.10 28-Jul-1998  is Mention poll(2), too, where we formerly only mentioned select(2).
 1.9 21-Jul-1998  jeremy Added AppleTalk to the list of supported protocol domains.
 1.8 18-Jul-1998  lukem use AF_LOCAL instead of AF_UNIX
 1.7 30-Apr-1998  fair fix .Xr reference
 1.6 27-Nov-1997  mikel s/EACCESS/EACCES/, from Brian Evans via OpenBSD
 1.5 27-Feb-1995  cgd branches: 1.5.10;
merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.5.10.1 28-Nov-1997  mellon Pull rev 1.6 up from trunk (mikel)
 1.13.2.1 25-Jun-1999  perry pullup 1.13->1.14 (tron)
 1.14.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.18.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.18.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.18.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.18.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.31.2.2 25-Oct-2006  ghen Back out ticket #1568, it breaks source and binary compatibility.
Noted by pavel.
 1.31.2.1 25-Oct-2006  ghen Pull up following revision(s) (requested by ginsbach in ticket #1568):
sys/kern/uipc_socket.c: revision 1.120
lib/libc/sys/socket.2: revision 1.32
lib/libc/sys/socket.2: revision 1.33
Sort ERRORS. Bump date.
Add EAFNOSUPPORT as a possible error if the address family is not
supported. This adds further differentiation between which argument to
socket(2) caused the error. No longer are invalid domain (address family)
errors classified as ENOPROTOSUPPORT errors. This should make socket(2)
conform to current POSIX and X/Open standards. Fixes PR/33676.
 1.33.6.1 23-Sep-2007  wrstuden Sync with somewhat-recent netbsd-4.
 1.33.4.1 11-Sep-2007  msaitoh Pull up rev. 1.34-1.36 (requested by jnemeth in ticket #868):

Add PF_BLUETOOTH to list of supported protocol families.
ARPA IPv6 -> IPv6 reported from Robert Elz (PR/36933)
 1.35.4.1 06-Nov-2007  matt sync with HEAD
 1.37.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.37.2.1 17-Apr-2012  yamt sync with head
 1.39.6.2 23-Jun-2013  tls resync from head
 1.39.6.1 25-Feb-2013  tls resync with head
 1.41.16.1 18-May-2017  bouyer add PF_CAN
 1.51.2.1 02-Aug-2025  perseant Sync with HEAD
 1.26 17-Jul-2025  kre Man pages for O_CLOFORK implementation

These are Ricardo Branco's man page updates for affected functions
using O_CLOFORK (and associated variants) for NetBSD (with
a few minor changes and additions by me).
 1.25 29-Nov-2022  uwe branches: 1.25.4;
socketpair(2): Formatting nits
 1.24 29-Nov-2022  jschauma document the only supported type protocol, document type flags

This uses language taken from OpenBSD's manual page.
 1.23 27-Jun-2011  wiz Various minor improvements.
 1.22 26-Jun-2011  christos * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

- Add F_DUPFD_CLOEXEC to fcntl(2).
- Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
- Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
- Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
for socket(2) and socketpair(2).
- Add new paccept(2) syscall that takes an additional sigset_t to alter
the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
SOCK_NONBLOCK.
- Add new mode character 'e' to fopen(3) and popen(3) to open pipes
and file descriptors for close on exec.
- Add new kqueue1(2) syscall with a new flags argument to open the
kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
(rump_syscallargs.h).

* Bump libc version for the new syscalls.
 1.21 20-Dec-2009  wiz Sort ERRORS.
 1.20 19-Dec-2009  pooka Remove note about portability, since PF_UNSPEC will cause socketpair()
to EAFNOSUPPORT on NetBSD(!). Additionally, at least slowaris and
linux talk only about PF_LOCAL. Finally, since I'm reading a NetBSD
man page, I foremost care about the code working on NetBSD.
 1.19 13-May-2004  wiz \- is a minus, not -.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 17-Aug-2002  yamt bring in a note about portability from openbsd.
 1.14 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.13 16-Oct-2001  kleink Remove inclusion of <sys/types.h> from synopsis; it is no longer needed.
 1.12 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.11 02-Dec-1999  kleink branches: 1.11.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.10 06-Jul-1999  darrenr branches: 1.10.4;
EOPNOTSUPP was incorrectly spelt as EOPNOSUPPORT
add ENFILE to list of errors.
 1.9 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 09-Mar-1999  ross More missing .El's.
 1.7 07-Jun-1998  enami Rename section DIAGNOSTICS to RETURN VALUES as descirbed in mdoc.samples(7).
While I'm here, sort some SEE ALSO section and uncapitalize symbol name.
 1.6 28-Apr-1998  fair Change occurrences of "UNIX" to .Ux or .At as appropriate.
 1.5 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.6.5 27-Aug-2002  nathanw Catch up to -current.
 1.11.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.11.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.11.6.2 14-Nov-2001  nathanw Catch up to -current.
 1.11.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.25.4.1 02-Aug-2025  perseant Sync with HEAD
 1.6 13-Nov-2007  ad - stack_protector.c doesn't really belong under sys/. Add a new directory
for misc support routines and put it there.
- Add a libc constructor. Use this to initialize threading and the
stack protector stuff. libpthread cannot be initialized safely using
its own constructor because libc and libpthread are deeply intertwined.
PR bin/37347
 1.5 27-Sep-2007  christos make this compilable from rtld.
 1.4 22-Nov-2006  christos branches: 1.4.8;
Don't expose _ss functions for 4.0. Requested by core.
 1.3 09-Nov-2006  christos libgcc needs __stack_chk_fail_local(); make it public
 1.2 08-Nov-2006  christos Add the threaded version.
 1.1 08-Nov-2006  christos add ssp code and bump.
 1.4.8.2 09-Jan-2008  matt sync with HEAD
 1.4.8.1 06-Nov-2007  matt sync with HEAD
 1.60 15-Oct-2023  jschauma document S_ISWHT, sort these macros
 1.59 01-Sep-2019  sevan branches: 1.59.8;
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf
 1.58 03-Feb-2017  abhinav branches: 1.58.12; 1.58.14;
Remove comma after the last Nm entry.
 1.57 10-Apr-2014  wiz branches: 1.57.6; 1.57.10;
Mention the word 'inode' next to st_ino so it's easier to find.
Bump date.
 1.56 15-Oct-2013  njoly branches: 1.56.2;
Adjust needed includes for fchmodat/mkdirat/mkfifoat/mknodat/fstatat
syscalls.
 1.55 28-Jul-2013  njoly Add fstatat(2) specific errors.
 1.54 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.53 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.52 01-Dec-2012  wiz Remove trailing whitespace.
 1.51 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.50 04-Jan-2012  wiz branches: 1.50.6;
Fix a sentence, following a hint by Abhinav Upadhyay.
 1.49 14-Sep-2011  apb branches: 1.49.2;
There's no st_block field; it's st_blocks.
 1.48 21-Feb-2011  pooka v-node -> vnode
(for consistency)
 1.47 25-Nov-2010  dholland branches: 1.47.2;
No file system I know of reports directory sizes that are multiples of
sizeof(struct dirent) except by accident. So, sync with reality. Brought
to my attention by Taylor R Campbell in chat.
 1.46 04-Jun-2010  jruoho Fix .Xr; dirent(5) -> dirent(3).
 1.45 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.44 18-May-2010  wiz Split "file system" and fix a typo.
 1.43 17-May-2010  jruoho Note that all stat-functions are standardized nowadays.
 1.42 17-May-2010  jruoho Try to describe the struct stat instead of copy-pasting it from the header.
Use xrefs to avoid duplication of effort. Note the S_IS*() macros.
 1.41 03-Apr-2010  jruoho Mention the history of stat(2) and fix the history of open(2).
 1.40 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.39 12-Feb-2010  wiz Fix typo.
 1.38 13-May-2009  wiz Sort errors. Avoid marking up punctuation.
 1.37 11-Mar-2009  joerg Fix markup
 1.36 10-Jun-2007  christos branches: 1.36.22;
Note ZFS returning the number of entries instead of the size of the directory.
 1.35 26-Dec-2005  perry u_intN_t -> uintN_t
 1.34 14-Jun-2005  peter - Correct the fields in the stat structure. From PR/18255.
- Document the st_birthtime field.

Reviewed by wiz.
 1.33 13-May-2004  wiz \- is a minus, not -.
 1.32 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.31 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.30 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.29 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.28 02-Aug-2002  soren stat(2) can return ENXIO.
 1.27 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.26 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.25 03-Feb-2002  fair Add a reference to dir(5) per PR 14291
 1.24 23-Oct-2001  kleink Reduce the ties to `inode'.
 1.23 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.22 16-Sep-2001  wiz Boring whitespace fixes.
 1.21 09-Jan-2001  augustss branches: 1.21.2;
Document a weird circumstance under which stat() return EBADF.
 1.20 07-Oct-2000  nathanw Use ".Fa stat" instead of ".Fn stat" when referring to the structure
rather than the function.
 1.19 29-Jun-2000  sommerfeld bin/10472: fix a couple typos in stat.2
 1.18 02-Dec-1999  kleink branches: 1.18.4;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.17 22-Mar-1999  garbled branches: 1.17.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.16 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.15 02-Feb-1998  perry merge lite-2
 1.14 11-Oct-1997  enami Don't start function name with capital letter even if it is beginning
of a sentence.
 1.13 11-Oct-1997  enami Remove description about behaviour of 4.4BSD symlink.
 1.12 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.11 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.10 22-Apr-1997  mikel add description of file flags, with xrefs to chflags(2).
add missing group/other file mode bits (!).
eliminate obsolete CAVEATS section.
fix misc. grammar and macro usage errors.
 1.9 17-Jan-1996  jtc Add S_IFWHT to correspond with <sys/stat.h>; Reported by Mike Long in PR #1949
 1.8 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.7 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.6 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.5 10-Jan-1994  jtc Fix spelling errors.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.17.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.4.1 29-Jun-2000  thorpej Pull up rev. 1.19:
bin/10472: fix a couple typos in stat.2
 1.21.2.7 18-Oct-2002  nathanw Catch up to -current.
 1.21.2.6 13-Aug-2002  nathanw Catch up to -current.
 1.21.2.5 21-Jun-2002  nathanw Catch up to -current.
 1.21.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.21.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.21.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.21.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.36.22.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.47.2.1 05-Mar-2011  bouyer Sync with HEAD
 1.49.2.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.49.2.3 23-Jan-2013  yamt sync with head
 1.49.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.49.2.1 17-Apr-2012  yamt sync with head
 1.50.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.50.6.2 25-Feb-2013  tls resync with head
 1.50.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.56.2.1 10-Aug-2014  tls Rebase.
 1.57.10.1 21-Apr-2017  bouyer Sync with HEAD
 1.57.6.1 20-Mar-2017  pgoyette Sync with HEAD
 1.58.14.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.58.12.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.59.8.1 20-Jul-2024  martin Pull up following revision(s) (requested by rin in ticket #755):

lib/libc/sys/stat.2: revision 1.60

document S_ISWHT, sort these macros
 1.6 13-Sep-2005  christos compat core reorg.
 1.5 19-Aug-2005  christos 64 bit inode changes
 1.4 12-Jun-2005  lukem Add missing __RCSID()
 1.3 02-Dec-1998  thorpej Warn about references to the compatibility stat(), fstat(), and lstat(),
and direct the user to include <sys/stat.h> to generate the correct
reference.
 1.2 22-Oct-1997  fvdl New hacks to make libc work painlessly without bumping the major number:
use type func(arg1s) asm("emitted_name") gcc mechanism.
Suggested by Bill Sommerfeld.
 1.1 20-Oct-1997  thorpej branches: 1.1.2;
Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2). This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.
 1.1.2.1 22-Oct-1997  thorpej Pull up from trunk:

New hacks to make libc work painlessly without bumping the major number:
use type func(arg1s) asm("emitted_name") gcc mechanism.
Suggested by Bill Sommerfeld.
 1.24 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.23 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.22 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.21 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.20 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.19 16-Sep-2001  wiz Boring whitespace fixes.
 1.18 28-Feb-2000  enami branches: 1.18.6;
Sync wi/ reality.
 1.17 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.16 29-Aug-1998  lukem branches: 1.16.6;
first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.15 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.14 02-Feb-1998  perry merge lite-2
 1.13 18-Dec-1997  mikel sync struct statfs with <sys/mount.h>
 1.12 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.11 09-Aug-1996  thorpej branches: 1.11.6;
Phrasing/formatting tweaks, from Kenneth Stailey <kstailey@dol-esa.gov>
in PR #2677.
 1.10 29-Jun-1995  cgd make these manual pages match current reality
 1.9 27-Feb-1995  cgd fix RCS Id. fix definition of fsid_t.
 1.8 26-Aug-1994  mycroft Update based on the 4.4-Lite version.
 1.7 25-Apr-1994  cgd branches: 1.7.2;
update to match reality; this was *really* out of date!
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 02-Feb-1998  perry import lite-2
 1.1.1.2 26-Aug-1994  mycroft Import original 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.2.1 26-Aug-1994  mycroft update from trunk
 1.11.6.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.16.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.18.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.18.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.18.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.6 13-Sep-2005  christos compat core reorg.
 1.5 12-Jun-2005  lukem Add missing __RCSID()
 1.4 12-Apr-2005  drochner getmntinfo() if a compatibility function, so there is no point in hiding
references to the compatibility getfsstat()
The real problem behind PR lib/29919 was a stale weak_alias, so back out
the workaround.
 1.3 07-Apr-2005  christos PR/29919: Evaldo Gardenali: getmntinfo() calling deprecated function getfsstat()
Fixed by defining an _getfsstat() internal function and calling that instead.
 1.2 09-Feb-2005  kleink branches: 1.2.2;
A little libc namespace housekeeping exercise:
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.
 1.1 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.2.2.2 01-Mar-2006  riz Pull up following revision(s) (requested by drochner in ticket #1187):
lib/libc/sys/statfs.c: revision 1.4
lib/libc/gen/getmntinfo.c: revision 1.15
getmntinfo() if a compatibility function, so there is no point in hiding
references to the compatibility getfsstat()
The real problem behind PR lib/29919 was a stale weak_alias, so back out
the workaround.
 1.2.2.1 08-Apr-2005  tron Pull up revision 1.3 (requested by bouyer in ticket #125):
PR/29919: Evaldo Gardenali: getmntinfo() calling deprecated function getfsstat()
Fixed by defining an _getfsstat() internal function and calling that instead.
 1.7 04-Apr-2020  nia statvfs.2: Add STANDARDS section.

Reviewed by kamil
 1.6 14-May-2017  wiz branches: 1.6.10;
file system police.
 1.5 31-May-2010  njoly branches: 1.5.36;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.4 04-Nov-2005  gendalia statvfs did not appear in 2.1, but in 3.0.
 1.3 21-Apr-2004  kleink branches: 1.3.2;
Xref statvfs(5).
 1.2 21-Apr-2004  wiz Whitespace nits; fix a minus; remove unnecessary {}.
 1.1 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.3.2.1 18-Dec-2005  tron Pull up following revision(s) (requested by riz in ticket #1062):
lib/libc/sys/statvfs.2: revision 1.4
statvfs did not appear in 2.1, but in 3.0.
 1.5.36.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.6.10.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.6 28-Apr-2008  martin branches: 1.6.8; 1.6.64;
Remove clause 3 and 4 from TNF licenses
 1.5 12-Feb-2008  drochner branches: 1.5.4;
remove a stale __weak_alias (code went into the compat section)
 1.4 31-Jul-2006  martin branches: 1.4.10;
Make filehandles opaque to userland
 1.3 12-Jun-2005  lukem Add missing __RCSID()
 1.2 09-Feb-2005  kleink A little libc namespace housekeeping exercise:
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.
 1.1 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.4.10.1 23-Mar-2008  matt sync with HEAD
 1.5.4.1 18-May-2008  yamt sync with head.
 1.6.64.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.8.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6.8.1 28-Apr-2008  martin file statvfs.c was added on branch christos-time_t on 2008-04-28 20:23:01 +0000
 1.40 04-Feb-2024  mrg update my email address.
 1.39 02-Nov-2014  njoly Use more markups in AUTHORS section.
 1.38 28-Apr-2011  wiz Sort ERRORS.
 1.37 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.36 17-May-2010  jruoho Use -enum in the list for clarity.
 1.35 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.34 29-May-2008  mrg branches: 1.34.6;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.33 13-Feb-2008  rillig branches: 1.33.4; 1.33.6;
I tried to add a partition to the swap space that wasn't marked as swap
partition, and I got ENXIO. Since the existing description didn't apply
to this case, I added another.
 1.32 29-May-2005  christos branches: 1.32.10;
Remove the bogus const.
 1.31 25-Mar-2004  wiz Use Aq instead of \*[Lt]\*[Gt]; \- for a minus; remove
superfluous comma.
 1.30 21-Mar-2004  mrg clean up my copyright
 1.29 04-Dec-2003  keihan netbsd.org -> NetBSD.org
NetBSD.ORG -> NetBSD.org

Now src/lib is done.
 1.28 13-Oct-2003  agc Move Matt Green's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22396 by Joel Baker, the changes
were confirmed to the board by Matt Green.
 1.27 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.26 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.25 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.24 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.23 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.22 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.21 16-Sep-2001  wiz Boring whitespace fixes.
 1.20 07-Jun-2001  mrg note the SWAP PRIORITY section in swapctl.8
 1.19 11-Apr-2001  mrg expand on swap priorities, xref new section in swapctl(8). PR#12610.
 1.18 10-Mar-2001  wiz Fix typo reported by Geoff C. Wing in pkg/12369.
 1.17 17-Nov-2000  mrg branches: 1.17.2;
document SWAP_DUMPDEV & SWAP_GETDUMPDEV.
 1.16 27-Jun-2000  mrg <vm/vm_param.h> is now <uvm/uvm_param.h>
 1.15 28-Feb-2000  enami Remove reference to config(8) from SEE ALSO list.
 1.14 13-Jan-2000  ad swapctl(SWAP_OFF, ...) now works.
 1.13 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 22-Mar-1999  garbled branches: 1.12.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 09-Mar-1999  ross More missing .El's.
 1.10 29-Aug-1998  mrg <vm/vm_swap.h> -> <sys/swap.h>
 1.9 29-Aug-1998  mrg - update for se_path member.
- while i'm here, document the swap flags, and also add (short) descriptions
of each of the swapent members.
 1.8 03-Feb-1998  perry fix 4931 from Brian Grayson; NSTATS was used on the man page instead
of NSWAP.
 1.7 16-Oct-1997  christos Remove swapon remnants
 1.6 10-Oct-1997  mrg when creating the per-device extent, use from 0 to nblks, and then
extent_alloc_region() any skipped space. this is (basically) what
the previous swap code did (with rmaps rather than extents).
 1.5 27-Aug-1997  mikel add HISTORY line for swapon(), and eliminate all reference to libc
major numbers.
 1.4 20-Aug-1997  mikel fix numerous typos, some found by <entropy@tardis.bernstein.com> (PR
lib/4016) and others found by myself. make Dt macro (document title)
match filename.
 1.3 20-Jun-1997  mrg actually document swapctl(2).
 1.2 12-Jun-1997  mrg move swapon() stub here
 1.1 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.17.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.17.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.17.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.32.10.1 23-Mar-2008  matt sync with HEAD
 1.33.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.33.4.1 04-Jun-2008  yamt sync with head
 1.34.6.2 29-May-2008  mrg remove clause #3 from my license where there are no other
copyright holders involved.
 1.34.6.1 29-May-2008  mrg file swapctl.2 was added on branch christos-time_t on 2008-05-29 14:51:26 +0000
 1.8 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.16 31-May-2010  njoly Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.15 13-May-2004  wiz \- is a minus, not -.
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.11 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.10 07-Feb-2002  ross Generate <>& symbolically.
 1.9 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.8 16-Sep-2001  wiz Boring whitespace fixes.
 1.7 28-Feb-2000  enami branches: 1.7.6;
With SEE ALSO list, add swapctl(2) and swapctl(8) and remove config(8).
 1.6 13-Jan-2000  ad swapctl(SWAP_OFF, ...) now works.
 1.5 22-Mar-1999  garbled Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.4 09-Mar-1999  erh Add missing .El lines.
 1.3 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.2 28-Feb-1998  enami Put back (probably) an oversight in last commit; Er is actually a
macro and actual longest symbol is ENAMETOOLONG.
 1.1 20-Oct-1997  christos branches: 1.1.1;
Bring back swapon and getdirentries from libcompat.
 1.1.1.1 02-Feb-1998  perry import lite-2
 1.7.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.7.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.7.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.7.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.11 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.10 29-May-2008  mrg branches: 1.10.2; 1.10.6;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.9 12-Jun-2005  lukem branches: 1.9.18; 1.9.20;
Add missing __RCSID()
 1.8 12-Jun-2005  christos unconst argument to swapctl().
 1.7 18-Mar-1999  mrg -> <sys/swap.h>
 1.6 05-Nov-1997  cgd include sys/types.h rather than sys/param.h+sys/systm.h
 1.5 20-Oct-1997  christos branches: 1.5.2;
Bring back swapon and getdirentries from libcompat.
 1.4 16-Oct-1997  christos swapon migrated to libcompat
 1.3 10-Oct-1997  mrg remove advertising clause from all my licenses.
 1.2 13-Jul-1997  christos Fix RCSID's
 1.1 12-Jun-1997  mrg move swapon() stub here
 1.5.2.1 06-Nov-1997  mellon Pull rev 1.6 up from trunk (cgd)
 1.9.20.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.18.1 04-Jun-2008  yamt sync with head
 1.10.6.2 29-May-2008  mrg remove clause #3 from my license where there are no other
copyright holders involved.
 1.10.6.1 29-May-2008  mrg file swapon.c was added on branch christos-time_t on 2008-05-29 14:51:26 +0000
 1.10.2.1 30-Oct-2012  yamt sync with head
 1.26 29-Jul-2013  njoly Add symlinkat(2) specific errors.
 1.25 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.24 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.23 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.22 01-Dec-2012  wiz Remove trailing whitespace.
 1.21 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.20 31-May-2010  njoly branches: 1.20.6; 1.20.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.19 13-May-2004  wiz \- is a minus, not -.
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Boring whitespace fixes.
 1.13 02-Dec-1999  kleink branches: 1.13.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 22-Mar-1999  garbled branches: 1.12.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 04-Jan-1999  tron On suggestion by Brian C. Grayson explain more detailed when [ENOENT]
will be returned.
 1.10 02-Jan-1999  tron Mention that symlinks don't need to point to an existing file or
directory as suggested by Brian Grayson in PR misc/6711.
 1.9 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.8 25-Mar-1997  mikel add xrefs to readlink(2) and symlink(7). former from Brian Grayson in
PR misc/3378, latter by me.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.13.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.13.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.20.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.12.2 25-Feb-2013  tls resync with head
 1.20.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.20.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.20.6.2 23-Jan-2013  yamt sync with head
 1.20.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.18 14-May-2017  wiz file system police.
 1.17 25-Mar-2009  wiz branches: 1.17.36;
Sort SEE ALSO.
 1.16 25-Mar-2009  dholland Update the note about sync returning before buffers are written: it is a
piece of historical behavior, not a current bug. Also, while here, add a
bit about disk write-back caches and point to dkctl/scsictl.
Bump date. (first time since 1993!)
 1.15 07-Aug-2003  agc branches: 1.15.42;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.9 16-Sep-2001  wiz Boring whitespace fixes.
 1.8 06-Oct-2000  jdolecek branches: 1.8.2;
update(8) is gone, put in some info about ioflush
this addresses bin/11141 by Nick Hudson
 1.7 02-Dec-1999  kleink branches: 1.7.4;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.6 22-Mar-1999  garbled branches: 1.6.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.5 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.4.1 07-Oct-2000  jdolecek pullup rev. 1.8 from trunk (approved by thorpej):
remove reference to update(8), it no longer exists
add a few words about ioflush instead
 1.8.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.8.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.8.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.8.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.15.42.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.17.36.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.9 02-Dec-1999  kleink branches: 1.9.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.8 26-Apr-1999  ross branches: 1.8.4;
Spelling.
 1.7 29-Aug-1998  lukem branches: 1.7.2;
first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.6 25-Feb-1998  perry change second parm of sysarch() from char * to void *
 1.5 24-Nov-1997  lukem fix .Nx usage (use 1.0 instead of 0.9a, etc), and other minor cleanups
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 01-Dec-1993  jtc Manpage formatting tweaks.
 1.2 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.1 12-Oct-1993  cgd adding sysarch() man page
 1.7.2.1 26-Apr-1999  perry pullup 1.7->1.8 (ross)
 1.8.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.9.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.9.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.9.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.18 07-Aug-2009  dsl Add text to the description saying that normal applications should not
use syscall().
Add text to bugs saying that high bits of the syscall number may be masked.
Fixes bug PR/11088
 1.17 23-Nov-2007  dsl Add a note about the difficulty of actually looking at the return value
of __syscall() caused by ABIs (eg sparc) that don't pass the low bits of
a 64 bit result in the same register as a 32 bit result.
 1.16 13-May-2004  wiz branches: 1.16.16;
\- is a minus, not -.
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.12 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.9 31-Jan-2000  christos branches: 1.9.6;
Explain why we don't want to pass structs and unions to syscalls, and
how to find the proper args for a syscall.
 1.8 02-Dec-1999  kleink Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.7 22-Mar-1999  garbled branches: 1.7.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.6 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.5 21-Dec-1996  cgd note that __syscall() is prototyped to return a quad_t
 1.4 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.9.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.9.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.9.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.16.16.1 09-Jan-2008  matt sync with HEAD
 1.13 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.12 06-Nov-2012  uwe Mention sigevent(3) not only in DESCRIPTION but in SEE ALSO as well.
 1.11 19-May-2010  jruoho branches: 1.11.6; 1.11.12;
Refer to sigevent(3).
 1.10 22-Mar-2010  joerg Use .In for header files instead of .Ar Pa and variations.
 1.9 26-Mar-2009  drochner fix typo in sigevent defaults
 1.8 30-Apr-2008  martin branches: 1.8.8; 1.8.10;
Convert TNF licenses to new 2 clause variant
 1.7 14-Mar-2004  snj branches: 1.7.30;
Spelling fix.
 1.6 14-Oct-2003  wiz Move siginfo(5) and ucontext(5) to siginfo(2) and ucontext(2) resp.,
and fix references.
Per a discussion on source-changes around Sep 14 2003.
 1.5 14-Sep-2003  wiz In is only to be used in SYNOPSIS; Aq Pa is better for other places.
Problem noticed by kleink.
 1.4 14-Sep-2003  wiz Various fixes.
 1.3 13-Sep-2003  kleink Fix some typos, attempt some markup normalization, align wording a little
more with other manual pages.
 1.2 13-Sep-2003  kleink Sprinkle restrict into timer_{create,settime}(2).
 1.1 13-Sep-2003  christos Add timer man pages. Hi Nathan!
 1.7.30.1 18-May-2008  yamt sync with head.
 1.8.10.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.8.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.8.8.1 30-Apr-2008  martin file timer_create.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.11.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.11.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.5 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 14-Jul-2000  kleink branches: 1.4.2;
KNF.
 1.3 15-Nov-1998  christos delint
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 17-Apr-1997  jtc Add stubs which set errno to ENOSYS and return -1 for the POSIX.1b
timer_* API. This was done to avoid bumping the libc minor number
each time a new portion is implemented.

This should be extended to the entire .1b API, although that will
require minor header file modifications to add the required structure
and type definitions.
 1.4.2.1 17-Nov-2001  nathanw Timer syscalls exist now.
 1.5 30-Apr-2008  martin branches: 1.5.8;
Convert TNF licenses to new 2 clause variant
 1.4 14-Sep-2003  wiz branches: 1.4.30;
Various fixes.
 1.3 13-Sep-2003  kleink Fix some typos, attempt some markup normalization, align wording a little
more with other manual pages.
 1.2 13-Sep-2003  christos Fix markup.
 1.1 13-Sep-2003  christos Add timer man pages. Hi Nathan!
 1.4.30.1 18-May-2008  yamt sync with head.
 1.5.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5.8.1 30-Apr-2008  martin file timer_delete.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.5 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 14-Jul-2000  kleink branches: 1.4.2;
KNF.
 1.3 15-Nov-1998  christos delint
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 17-Apr-1997  jtc Add stubs which set errno to ENOSYS and return -1 for the POSIX.1b
timer_* API. This was done to avoid bumping the libc minor number
each time a new portion is implemented.

This should be extended to the entire .1b API, although that will
require minor header file modifications to add the required structure
and type definitions.
 1.4.2.1 17-Nov-2001  nathanw Timer syscalls exist now.
 1.5 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 14-Jul-2000  kleink branches: 1.4.2;
KNF.
 1.3 15-Nov-1998  christos delint
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 17-Apr-1997  jtc Add stubs which set errno to ENOSYS and return -1 for the POSIX.1b
timer_* API. This was done to avoid bumping the libc minor number
each time a new portion is implemented.

This should be extended to the entire .1b API, although that will
require minor header file modifications to add the required structure
and type definitions.
 1.4.2.1 17-Nov-2001  nathanw Timer syscalls exist now.
 1.5 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 14-Jul-2000  kleink branches: 1.4.2;
KNF.
 1.3 15-Nov-1998  christos delint
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 17-Apr-1997  jtc Add stubs which set errno to ENOSYS and return -1 for the POSIX.1b
timer_* API. This was done to avoid bumping the libc minor number
each time a new portion is implemented.

This should be extended to the entire .1b API, although that will
require minor header file modifications to add the required structure
and type definitions.
 1.4.2.1 17-Nov-2001  nathanw Timer syscalls exist now.
 1.10 23-Sep-2021  uwe Spell the number of nanoseconds as 10^9.

10^9 is 1e9 (it's "e" that spells 10 here), not 10e9. The target
audience of this man page is not likely to be very fluent in floating
point, so avoid significand/exponent spelling and use the spelling
that it is familiar with.
 1.9 06-Nov-2012  wiz NL -> . to improve output
 1.8 06-Nov-2012  uwe Fix another typo.
 1.7 06-Nov-2012  uwe Fix typo.
 1.6 17-May-2010  jruoho branches: 1.6.6; 1.6.12;
Reference timeval(3).
 1.5 30-Apr-2008  martin branches: 1.5.8;
Convert TNF licenses to new 2 clause variant
 1.4 14-Sep-2003  wiz branches: 1.4.30;
Various fixes.
 1.3 13-Sep-2003  kleink Fix some typos, attempt some markup normalization, align wording a little
more with other manual pages.
 1.2 13-Sep-2003  kleink Sprinkle restrict into timer_{create,settime}(2).
 1.1 13-Sep-2003  christos Add timer man pages. Hi Nathan!
 1.4.30.1 18-May-2008  yamt sync with head.
 1.5.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5.8.1 30-Apr-2008  martin file timer_settime.2 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.6.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.5 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.4 14-Jul-2000  kleink branches: 1.4.2;
KNF.
 1.3 15-Nov-1998  christos delint
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 17-Apr-1997  jtc Add stubs which set errno to ENOSYS and return -1 for the POSIX.1b
timer_* API. This was done to avoid bumping the libc minor number
each time a new portion is implemented.

This should be extended to the entire .1b API, although that will
require minor header file modifications to add the required structure
and type definitions.
 1.4.2.1 17-Nov-2001  nathanw Timer syscalls exist now.
 1.4 23-Sep-2021  uwe Spell the number of nanoseconds as 10^9. Forgotten in previous.
 1.3 23-Sep-2021  uwe Minor markup tweaks.
 1.2 19-Sep-2021  wiz Sort errors, remove extra comma.
 1.1 19-Sep-2021  thorpej Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.
 1.31 14-May-2017  wiz file system police.
 1.30 25-Jul-2014  wiz branches: 1.30.14;
Sort SEE ALSO.
 1.29 25-Jul-2014  dholland Add userlevel manifestations of posix_fallocate and fdiscard, in
unistd.h and libc, and add a man page.

Allow wiggle room in the man page for implementations of fallocate
that either (a) don't fully unwind on failure, leaving new blocks
allocated without changing the file size, or (b) create only in-memory
transient reservations that disappear when crashing or rebooting.

Also, add crossreference to fdiscard from ftruncate(2), and remove the
old BUGS entry from there that called for a generalized version that
allows discarding ranges of a file: that's what fdiscard is.
 1.28 14-Jun-2014  wiz Sort errors.
 1.27 14-Jun-2014  njoly Follow OpenGroup online documents for truncate[1] and ftruncate[2].
Fail with EINVAL for length argument negative values.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html
 1.26 31-May-2010  njoly branches: 1.26.8; 1.26.12; 1.26.22;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.25 16-Mar-2008  wiz Describe how to portable extend a file. From joerg. Bump date.
 1.24 10-Mar-2008  wiz Move previously added sentence to STANDARDS section, as suggested by yamt.
 1.23 10-Mar-2008  wiz Mention that extending files with truncate is a POSIX extension.
Requested by joerg.

Bump date.
 1.22 27-Jul-2006  christos branches: 1.22.10; 1.22.16;
More detailed errors [forgot to commit this a while ago]
 1.21 13-May-2004  wiz \- is a minus, not -.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.17 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.16 18-Aug-2002  yamt add a portablility note. from openbsd.
 1.15 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.14 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.13 16-Sep-2001  wiz Boring whitespace fixes.
 1.12 17-Jun-2000  hubertf branches: 1.12.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.11 28-May-2000  jdolecek update to match current common implementation on NetBSD - [f]truncate()
normally lengtens the file if it's shorter than specified length
also change wording slighly, to match wording in SUS

XXX someone should check how much of SUS truncate(2) specification is true
XXX on NetBSD and update this manpage accordingly
 1.10 02-Dec-1999  kleink branches: 1.10.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.12.4.5 18-Oct-2002  nathanw Catch up to -current.
 1.12.4.4 27-Aug-2002  nathanw Catch up to -current.
 1.12.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.12.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.12.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.16.1 24-Mar-2008  keiichi sync with head.
 1.22.10.1 23-Mar-2008  matt sync with HEAD
 1.26.22.1 10-Aug-2014  tls Rebase.
 1.26.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.8.1 03-Nov-2014  msaitoh Pull up following revision(s) (requested by manu in ticket #1150):
lib/libc/sys/truncate.2: revision 1.27
sys/kern/vfs_syscalls.c: revision 1.484
Follow OpenGroup online documents for truncate[1] and ftruncate[2].
Fail with EINVAL for length argument negative values.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html
 1.30.14.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.13 20-Mar-2012  matt Convert to C89 prototypes. Remove use of __P
 1.12 23-Nov-2007  uebayasi branches: 1.12.30;
KNF; no variable name in function prototype.
 1.11 22-Nov-2007  dsl Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
 1.10 07-Aug-2003  agc branches: 1.10.22;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.9 15-Nov-1998  christos delint
 1.8 13-Jul-1997  christos Fix RCSID's
 1.7 23-Dec-1996  cgd Fix quad_t __syscall() return goofs. Now these should work on big-endian
systems, too.
 1.6 22-Dec-1996  cgd explicitly cast __syscall() returns to (int) so that lint knows
that we know what we're doing.
 1.5 20-Dec-1996  cgd pull in unistd.h for prototypes
 1.4 19-Apr-1995  jtc char * -> const char *
 1.3 27-Feb-1995  cgd clean up merge, fix Id's
 1.2 06-May-1994  cgd branches: 1.2.4;
clean
 1.1 02-Apr-1994  cgd branches: 1.1.1;
stubs, to get the padding right. so nasty it's almost unbelievable.
also, kill "special lseek" bogon.
 1.1.1.1 27-Feb-1995  cgd from Lite
 1.2.4.1 18-Apr-1995  jtc #include "namespace.h"
 1.10.22.1 09-Jan-2008  matt sync with HEAD
 1.12.30.1 17-Apr-2012  yamt sync with head
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.12 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 02-Dec-1999  kleink branches: 1.10.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.9 22-Mar-1999  garbled branches: 1.9.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.8 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.7 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 18-May-1994  jtc The umask effects mknod(2) too.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 05-Oct-1993  jtc Changed SYNOPSIS, include <sys/types.h> too.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.10.6.4 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.3 21-Jun-2002  nathanw Catch up to -current.
 1.10.6.2 22-Mar-2002  nathanw Catch up to -current.
 1.10.6.1 08-Mar-2002  nathanw Catch up to -current.
 1.6 01-Mar-1995  mycroft Clean up deleted files.
 1.5 15-Dec-1993  jtc More manpage tweaks.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 06-May-1993  cgd diffs for uname (posix!) system call, provided by John Brezak <brezak@osf.org>
 1.17 14-May-2017  wiz file system police.
 1.16 11-Nov-2014  njoly branches: 1.16.6;
Do not hardcode values for ENAMETOOLONG, use symblic constants.
 1.15 11-Jan-2009  christos merge christos-time_t
 1.14 28-Nov-2008  wiz Sort errors.
 1.13 28-Nov-2008  pooka make the synopsis slightly less overpromising:
"attempt to recover a deleted file" => "remove whiteout"
 1.12 13-May-2004  wiz branches: 1.12.34;
\- is a minus, not -.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.10 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.8 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 17-Jun-2000  hubertf branches: 1.7.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.6 02-Dec-1999  kleink branches: 1.6.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.5 22-Mar-1999  garbled branches: 1.5.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.4 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.3 03-Feb-1998  perry .Bx'ize/.Nx'ize
 1.2 02-Feb-1998  perry merge lite-2
 1.1 02-Feb-1998  perry branches: 1.1.1;
Initial revision
 1.1.1.1 02-Feb-1998  perry import lite-2
 1.5.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.4.2 22-Mar-2002  nathanw Catch up to -current.
 1.7.4.1 08-Mar-2002  nathanw Catch up to -current.
 1.12.34.1 04-Jan-2009  christos merge with head.
 1.16.6.1 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.30 02-Sep-2019  sevan unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
 1.29 30-Mar-2017  abhinav branches: 1.29.12; 1.29.14;
Remov comma from the last Nm entry
Use Xr instead of Fn to refer rmdir(2)
Fix couple of sentences
 1.28 28-Jul-2013  njoly branches: 1.28.8; 1.28.12;
Add unlinkat(2) specific errors.
 1.27 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.26 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.25 01-Dec-2012  wiz Remove trailing whitespace.
 1.24 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.23 31-May-2010  njoly branches: 1.23.6; 1.23.12;
Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
 1.22 05-Apr-2010  wiz Sort ERRORS section.
 1.21 03-Apr-2010  jruoho An unlink() appeared already in v2 UNIX.
 1.20 13-May-2004  wiz \- is a minus, not -.
 1.19 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.16 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 17-Jun-2000  hubertf branches: 1.14.4;
Merge duplicate mentions of EPERM, EACCESS, ... into one entry
(where applicable).
 1.13 02-Dec-1999  kleink branches: 1.13.2;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.12 22-Mar-1999  garbled branches: 1.12.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.11 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.10 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.9 01-Jul-1997  kleink EPERM is returned when the file to be removed is a directory and the file
system containing it does not permit the use of unlink(2) on a directory.
Add a missing comma.
 1.8 16-May-1997  kleink Add/update 1003.1 conformance notice.
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 29-Nov-1993  jtc Use "Er" for argument to -width in the lists in the ERROR sections --- so
the formatting is consistant.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.2.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.14.4.3 22-Mar-2002  nathanw Catch up to -current.
 1.14.4.2 08-Mar-2002  nathanw Catch up to -current.
 1.14.4.1 08-Oct-2001  nathanw Catch up to -current.
 1.23.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.12.2 25-Feb-2013  tls resync with head
 1.23.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.23.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.6.2 23-Jan-2013  yamt sync with head
 1.23.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.28.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.28.8.1 26-Apr-2017  pgoyette Sync with HEAD
 1.29.14.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.29.12.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.40 05-Oct-2013  ast Fixed spelling of 'appeared'.
 1.39 14-Sep-2013  njoly Add needed sys/stat.h include for utimens functions.
 1.38 29-Jul-2013  njoly Add utimensat(2) specific errors.
 1.37 08-Mar-2013  christos PR/47631: NAKAJIMA Yoshihiro

1. Utimens and lutimens don't require timeval but timespec.
2. The order of functions doesn't have a uniformity.
3. Utimens.2 and lutimens.2 aren't installed.
 1.36 13-Jan-2013  dholland Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
- it is incorrect in a whole variety of ways (but fortunately, one
of them is that the missing and improper permission checks have
no net effect);
- it was committed without review or discussion;
- core ruled that all the new O_* flags pertaining to the *at calls
needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
 1.35 01-Dec-2012  wiz Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
 1.34 01-Dec-2012  wiz Remove trailing whitespace.
 1.33 18-Nov-2012  manu Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
 1.32 04-Nov-2012  wiz Bump date for previous. Grammar fix.
 1.31 03-Nov-2012  christos add utimens and lutimens wrappers using utimensat.
 1.30 25-Oct-2011  wiz branches: 1.30.2; 1.30.8;
Fix typo reported by Henning Petersen in PR 45515.
 1.29 22-Aug-2011  enami Fix the name of syscall which takes timespec as argument.
 1.28 17-Aug-2011  wiz Remove trailing whitespace. Bump date for previous.
New sentence, new live. End sentence with dot.
 1.27 17-Aug-2011  manu Add futimens(2) and part of utimnsat(2)
 1.26 29-Apr-2010  jruoho Fix the standards: utimes(2) is still in SUSv4, although marked as legacy.
 1.25 29-Apr-2010  wiz Sort errors.
 1.24 29-Apr-2010  jruoho Note that utimes(2) no longer enjoys the blessing of POSIX.
 1.23 17-Jun-2008  christos branches: 1.23.6;
PR/38942: Pedro F. Giffuni: Mention that utimes now supports setting of
the birthtime. Text from FreeBSD.
 1.22 13-May-2004  wiz branches: 1.22.26;
\- is a minus, not -.
 1.21 27-Apr-2004  kleink POSIX-2001: Add restrict keywords to gettimeofday(2) and setitimer(2);
further deprecate struct timezone usage by changing `tzp' argument to
gettimeofday() to void *; align utimes(2) declaration by changing `times`
argument from struct timeval * to struct timeval[2]. From Murray
Armfield in PR standards/25331.

In due curse, reflect these changes in futimes(2), lutimes(2), and
settimeofday(2).
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.19 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 16-Sep-2001  wiz Boring whitespace fixes.
 1.15 02-Dec-1999  kleink branches: 1.15.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.14 26-Sep-1999  jdolecek xref symlink(7)
 1.13 22-Mar-1999  garbled branches: 1.13.4;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 11-Oct-1997  enami - Don't use captial letter for function name or function args even if
it is at the beginning of a sentence.
- In SYNOPSIS, rename function argument ``file'' to ``path'', since it is
refered as ``path'' in DESCRIPTION.
- Use ``Fa path'' instead of ``Xr File'', since probably use of Xr is a typo,
and now function argument is called ``path''.
 1.11 06-Oct-1997  enami Acutally, lchmod, lchown and lutimes may set errno to ELOOP.
 1.10 06-Oct-1997  enami Add C library interface for new system call lchmod, lchown and lutimes.
 1.9 23-Apr-1996  mycroft Document futimes().
 1.8 12-Jul-1995  cgd fix pr 1214 slightly differently. i _didn't_ use the .Fa macro to
mark "file," because in context it didn't seem as if the argument was
being literally named. rather it seemed that the argument's purpose
being described. (the difference being: "... modification times of the
file named by file" would be a case where the the argument was named,
and thus be used with .Fa.)
 1.7 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.6 22-Apr-1994  jtc Remove description of EINVAL, "The pathname contains a character with the
high-order bit set", as this error is obsolete.

Eventually we may want to add code to some of the "optional" filesystems
(msdosfs, etc.) that checks for illegal characters. At that time it would
be appropriate to reintroduce this error with appropriate text. Perhaps
"The pathname contains a character that is not valid for filesystem type".
 1.5 19-Apr-1994  jtc Use symbolic names {NAME_MAX} & {PATH_MAX} instead of 255 and 1023 in
description of ENAMETOOLONG error.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 14-Aug-1993  jtc Clean up manpage; cross-reference utime(3).
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.15.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.15.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.15.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.26.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.23.6.2 17-Jun-2008  christos PR/38942: Pedro F. Giffuni: Mention that utimes now supports setting of
the birthtime. Text from FreeBSD.
 1.23.6.1 17-Jun-2008  christos file utimes.2 was added on branch christos-time_t on 2008-06-17 17:46:41 +0000
 1.30.8.4 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.30.8.3 23-Jun-2013  tls resync from head
 1.30.8.2 25-Feb-2013  tls resync with head
 1.30.8.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.30.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.30.2.2 23-Jan-2013  yamt sync with head
 1.30.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.13 02-May-2008  martin branches: 1.13.8;
Move to 2 clasue license
 1.12 13-May-2004  wiz branches: 1.12.24;
\- is a minus, not -.
 1.11 24-Apr-2003  wiz Drop trailing space.
 1.10 20-Apr-2003  david Grammar.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.7 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.6 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.5 16-Sep-2001  wiz Boring whitespace fixes.
 1.4 05-Jun-2001  wiz NetBSD -> Nx
 1.3 24-Jan-2001  jdolecek branches: 1.3.2;
It seems utrace(2) actually appeared in FreeBSD 2.2, not 4.0 according
to FreeBSD CVS logs
 1.2 05-Jan-2001  jdolecek document KTR_USER_MAXLEN limit
 1.1 05-Jan-2001  jdolecek add utrace(2)
 1.3.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.3.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.3.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.12.24.1 18-May-2008  yamt sync with head.
 1.13.8.2 02-May-2008  martin Move to 2 clasue license
 1.13.8.1 02-May-2008  martin file utrace.2 was added on branch christos-time_t on 2008-05-02 18:38:33 +0000
 1.5 24-Jul-2019  riastradh Update uuidgen(2) man page to reflect reality as of five years ago.
 1.4 30-Jan-2005  jwise branches: 1.4.92;
Comment back in cross-references to other man pages, was looking at a non-recent
DESTDIR. Other half of last change was correct.

Pointed out by wizd.
 1.3 30-Jan-2005  jwise <sys/types.h> must be included before <sys/uuid.h>.

Also, while here, remove `SEE ALSO' section which referenced only man pages
which we do not have.
 1.2 30-Jan-2004  wiz Fix two typos, and remove a superfluous comma.
 1.1 29-Jan-2004  tsarna uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in
PR#23470, with minor updates by me. This is only the syscall support
from that PR, for now.

Changes: port over fix from FreeBSD for multicast address generation.
Changed bcopy to memcpy. For now, #ifdef notyet the portions of
kern_uuid.c that are meant to be used by (currently nonexistent) other
things in the kernel. Added syscall to COMPAT_FREEBSD as well, though
that's currently not useful, as any program new enough to use this call
also uses other syscalls we don't (yet) emulate.
 1.4.92.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3 26-Dec-2017  christos use __USE()
 1.2 26-Dec-2017  maya Match prior syscall behaviour
hide __RCSID under the same macros as rest of libc
 1.1 25-Dec-2017  kamil libc: Add a dummy implementation of vadvise()

This readds a symbol that has been removed accidentally without major bump.

The implementation is dummy (similar to the old one), without API in public
headers.

Pointed out by <maya>

Sponsored by <The NetBSD Foundation>
 1.30 09-Jun-2021  nia vfork.2: clarify posix_spawn recommendation, pointed out by kre
 1.29 08-Jun-2021  nia vfork.2: recommend posix_spawn instead
 1.28 19-May-2018  kamil Note in vfork(2) that SIGTSTP is masked

SIGSTOP is no longer masked, but it was never documented.

Sponsored by <The NetBSD Foundation>
 1.27 18-Jul-2014  dholland branches: 1.27.22;
Remove
Users should not depend on the memory sharing semantics of vfork() as
other ways of speeding up the fork process may be developed in the
future.

as we are not planning to deprecate vfork. Besides NetBSD's
compatibility policy means we wouldn't change it anyway but introduce
something new.

Add
Portable applications should not depend on the memory sharing semantics
of vfork() as implementations exist that implement vfork() as plain
fork(2).

because this is or used to be a real hazard.

ok christos
 1.26 18-Jul-2014  dholland Clarify HISTORY and bump date.
 1.25 18-Jul-2014  dholland fix typo and minor usage issue
 1.24 07-Aug-2003  agc branches: 1.24.62; 1.24.74;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.23 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.22 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.21 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.20 10-Jul-2002  wiz Use Fn instead of Xr to ourselves in one place.
 1.19 16-May-2002  wiz Remove duplicate that. lib/16849 by John Heasley.
 1.18 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.17 29-Nov-2001  ross grammar
 1.16 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 02-Dec-1999  kleink branches: 1.14.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.13 22-Mar-1999  garbled branches: 1.13.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 07-Jun-1998  enami Rename section DIAGNOSTICS to RETURN VALUES as descirbed in mdoc.samples(7).
While I'm here, sort some SEE ALSO section and uncapitalize symbol name.
 1.11 28-Apr-1998  fair fix mdoc references
 1.10 04-Jan-1998  thorpej Update to match the new (old :-) vfork(2) semantics.
 1.9 01-Nov-1997  mycroft Nuke trailing comma in SEE ALSO section.
 1.8 10-Jul-1997  mikel xref _exit(2) or exit(3) instead of exit(2)
 1.7 30-Jun-1997  phil Update for reality. vfork differes only in the suspension of the parent.
(Closes PR 2713.)
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 17-Oct-1994  cgd either change or update references to sigvec(), as appropriate
 1.4 30-Dec-1993  jtc branches: 1.4.2;
Changed return value from int to pid_t.
 1.3 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 17-Oct-1994  cgd from trunk.
 1.13.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.6.7 18-Oct-2002  nathanw Catch up to -current.
 1.14.6.6 01-Aug-2002  nathanw Catch up to -current.
 1.14.6.5 21-Jun-2002  nathanw Catch up to -current.
 1.14.6.4 22-Mar-2002  nathanw Catch up to -current.
 1.14.6.3 08-Mar-2002  nathanw Catch up to -current.
 1.14.6.2 28-Jan-2002  nathanw Catch up to -current.
 1.14.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.24.74.1 10-Aug-2014  tls Rebase.
 1.24.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.22.1 21-May-2018  pgoyette Sync with HEAD
 1.42 04-Dec-2022  uwe lib: Mark up error names in man pages with .Er
 1.41 17-Oct-2022  jschauma add missing 'the'
 1.40 02-Sep-2019  sevan wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
 1.39 20-Nov-2016  wiz branches: 1.39.14; 1.39.16;
Whitespace.
 1.38 20-Nov-2016  dholland Add crossreference to fork(2) per note in PR 9627.
 1.37 10-Nov-2016  christos Document WNOZOMBIE
 1.36 30-Jun-2016  abhinav branches: 1.36.2;
Document WAIT_ANY and WAIT_MYPGRP constants
(text referenced from OpenBSD wait(2) man page)

While there, remove duplicated information and add more refernces in SEE ALSO
Also, the NOTES section refers to intro(2), while siginterrupt(3) is a better
suited reference, so fix that too.

Ok by wiz
 1.35 29-Apr-2016  christos move section around.
 1.34 29-Apr-2016  wiz Sort a bit more.
 1.33 28-Apr-2016  christos - merge the options descriptions, sort them.
- fix wrusage name.
 1.32 06-Apr-2016  wiz Drop trailing whitespace.
 1.31 06-Apr-2016  christos revert part of previous; not needed.
 1.30 06-Apr-2016  christos - clarify si_signo difference for waitid and wait6 as per POSIX.
- implement it.
- document WIFCONTINUED
 1.29 04-Apr-2016  wiz Use more markup, fix a typo.
 1.28 03-Apr-2016  christos userland bits for wait6/waitid.
 1.27 03-Apr-2010  jruoho The functions read(), wait(), and write() appeared already in v2 UNIX.
 1.26 24-May-2004  lukem Put the description of "options" in a new paragraph, for consistency
 1.25 13-May-2004  wiz \- is a minus, not -.
 1.24 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.23 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.22 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.21 13-Nov-2002  wiz Drop trailing whitespace.
 1.20 12-Nov-2002  manu Explain how WIF* macros use the status value instead of the pointer to the status value as wait() does. We use the name 'status' both as the argument to wait() and WIF* macros, this is misleading.
 1.19 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.18 29-Apr-2002  simonb Remove <sys/types.h> from synopsis, as per latest SUS/Posix specs.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 16-Sep-2001  wiz Sort sections, sort SEE ALSO, punctuation and miscellanous fixes.
 1.15 16-Sep-2001  wiz Boring whitespace fixes.
 1.14 01-Sep-2001  simonb Don't need <sys/types.h> or <sys/time.h> before <sys/resource.h>.
References: SUSv2
 1.13 18-Jul-2001  thorpej Document WALTSIG (and __WCLONE) and WALLSIG (__WALL). Restructure the
options documentation to make it easier to read.
 1.12 02-Dec-1999  kleink branches: 1.12.6;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.11 22-Mar-1999  garbled branches: 1.11.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.10 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.9 14-Jul-1997  kleink Add missing `STANDARDS' compliance statements. As we #define _POSIX_VERSION
to 199009L, bump existing statements to 1003.1-1990.
 1.8 10-Jul-1997  mikel xref _exit(2) or exit(3) instead of exit(2)
 1.7 07-Feb-1997  mikel check options argument to wait{3,4,pid}(); from Klaus Klein in PR 3182.
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 10-Jan-1994  jtc Fix spelling errors.
 1.4 25-Nov-1993  jtc Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 05-Oct-1993  jtc Changed SYNOPSIS. Moved function "prototype" for waitpid above #include
of <sys/reso
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.6 10-Dec-2002  thorpej Sync with HEAD.
 1.12.6.5 18-Oct-2002  nathanw Catch up to -current.
 1.12.6.4 21-Jun-2002  nathanw Catch up to -current.
 1.12.6.3 22-Mar-2002  nathanw Catch up to -current.
 1.12.6.2 08-Mar-2002  nathanw Catch up to -current.
 1.12.6.1 08-Oct-2001  nathanw Catch up to -current.
 1.36.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.39.16.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.39.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.36 02-Sep-2019  sevan write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf
 1.35 03-Jul-2017  wiz branches: 1.35.6; 1.35.8;
Remove workaround for ancient HTML generation code.
 1.34 23-Apr-2017  abhinav Fix sentences at couple of places
s/a file/the file/
s/a -1 is returned/-1 is returned/
 1.33 14-Jul-2013  njoly branches: 1.33.10;
Switch a few remaining system/pathname configuration variables from
"Dv {xxx}" to "Brq Dv xxx".
 1.32 05-Apr-2010  wiz branches: 1.32.6; 1.32.12;
Sort ERRORS section.
 1.31 03-Apr-2010  jruoho The functions read(), wait(), and write() appeared already in v2 UNIX.
 1.30 15-Mar-2009  joerg ".The" is not a valid macro, fix up.
 1.29 13-Oct-2006  wiz branches: 1.29.28;
Make HTML-output safe.
 1.28 13-May-2004  wiz \- is a minus, not -.
 1.27 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.26 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.25 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.24 02-Jan-2003  wiz Drop trailing spaces; sort SEE ALSO.
 1.23 30-Dec-2002  sommerfeld In EINTR description, add a crossreference to sigaction(2).
Put reference to "slow device" back in since filesystem & disk I/O, doesn't get
EINTR while pipes, sockets, ttys, etc., can.
 1.22 30-Dec-2002  grant add EINTR.

From Kevin P. Neal in PR bin/19402.
 1.21 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.20 18-Aug-2002  yamt - write updates st_[cm]time.
- a minor fix
from openbsd.
 1.19 10-Jul-2002  yamt import CAVEATS sections from OpenBSD.
with little tweak by me.
 1.18 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.17 16-Oct-2001  kleink Clean up synopsis somewhat:
* only associate S/G interfaces with <sys/uio.h> (and only that header);
* drop <sys/types.h> entirely, as it is no longer needed.
 1.16 16-Sep-2001  wiz Boring whitespace fixes.
 1.15 21-Jun-2000  hubertf branches: 1.15.2;
s/the/The/ at beginngin of sentense.
 1.14 02-Dec-1999  kleink branches: 1.14.4;
Add a LIBRARY section to system call manual pages. While it's clear that the
libraries contain stubs only (with minor exceptions a la pipe(2)), the purpose
of this section is to provide linkage information.
 1.13 22-Mar-1999  garbled branches: 1.13.6;
Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!
 1.12 29-Aug-1998  lukem first pass at fixing up capitalization of function names and
arguments; ensure that each is correct with respect to the
implementation, rather than being correct as per english.
 1.11 03-Aug-1998  kleink UIO_MAXIOV -> IOV_MAX
 1.10 29-Jul-1998  thorpej Document that these calls can return EINVAL if the total length of the I/O
is more than can be expressed in the ssize_t return value.
 1.9 28-Jul-1998  is Mention poll(2), too, where we formerly only mentioned select(2).
 1.8 30-Jun-1998  thorpej Add pread(2), pwrite(2), preadv(2), pwritev(2) system calls.
 1.7 28-Apr-1998  fair Fix man to mdoc conversion mistakes, mostly of the form ^\.[A-Z][A-Z]
 1.6 27-Feb-1995  cgd merge with lite, keeping most local changes. clean up Ids
 1.5 16-Sep-1994  mycroft Use an explicit references to UIO_MAXIOV, rather than a number. ref: PR 433
 1.4 25-Nov-1993  jtc branches: 1.4.2;
Clean up manpages:
Use .Fn rather than .Nm macro in HISTORY and STANDARDS sections.
Use .At and .St macros instead of spelling out "Version 6 UNIX",
"IEEE 1003.1-1988 (POSIX)", etc.
 1.3 05-Oct-1993  jtc Changed Synopsis, Buffer is of type "void *", not "char *".
The <unistd.h> header was allready correct.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 27-Feb-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 06-Oct-1994  mycroft Update from trunk.
 1.13.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.4.1 21-Jun-2000  hubertf Pull up rev. 1.15.
s/the/The/ at beginngin of sentence.
 1.15.2.8 08-Jan-2003  thorpej Sync with HEAD.
 1.15.2.7 18-Oct-2002  nathanw Catch up to -current.
 1.15.2.6 27-Aug-2002  nathanw Catch up to -current.
 1.15.2.5 01-Aug-2002  nathanw Catch up to -current.
 1.15.2.4 22-Mar-2002  nathanw Catch up to -current.
 1.15.2.3 08-Mar-2002  nathanw Catch up to -current.
 1.15.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.15.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.29.28.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.32.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.33.10.1 26-Apr-2017  pgoyette Sync with HEAD
 1.35.8.1 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.35.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed