Home | History | Annotate | Download | only in sys
History log of /src/lib/libc/sys/fcntl.2
RevisionDateAuthorComments
 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 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

RSS XML Feed