summaryrefslogtreecommitdiff
path: root/lib/libc/sys
AgeCommit message (Collapse)Author
2021-12-10s/occured/occurred/ in comments, log messages and man pages.andvar
2021-11-19Mention that fchmod conforms to XPG 4.2. Bump date.wiz
2021-11-01Version the sigaction(2) libc wrapper. The new version uses the "siginfo"thorpej
trampoline exclusively, thus relegating "sigcontext"-style handlers (which have not been documented for many years now) to the dustbin of the compat library.
2021-11-01Don't mention the "struct sigaltstack" name of "stack_t".thorpej
2021-10-31Tidy up how __sigaction14_sigtramp.c is added to SRCS.thorpej
2021-10-27- Use the signal trampoline version constants from <sys/signal.h>.thorpej
- Declare the sigtramp externs as as char arrays, not int arrays; not all platforms have fixed-sized 32-bit instructions.
2021-10-26Merge all MD __sigaction14_sigtramp.c copies into one:christos
- 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.
2021-10-23Add support for the EVFILT_EMPTY filter, which is activated when thethorpej
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.
2021-10-20Oops, forgot to note the history of NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE,thorpej
and NOTE_READ.
2021-10-20Overhaul of the EVFILT_VNODE kevent(2) filter:thorpej
- 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.
2021-10-13Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,thorpej
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER, API-compatible with the same in FreeBSD.
2021-10-01PR/56424: Clay Mayers: recvfrom() is not a cancelation point as documentedchristos
in pthread_setcanceltype.3
2021-09-23Spell the number of nanoseconds as 10^9. Forgotten in previous.uwe
2021-09-23Minor markup tweaks.uwe
2021-09-23Spell the number of nanoseconds as 10^9.uwe
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.
2021-09-23Markup fixes.uwe
2021-09-19Sort errors, remove extra comma.wiz
2021-09-19Add native implementations of eventfd(2) and timerfd(2), compatible withthorpej
the Linux interfaces of the same name.
2021-08-22s/priviledge/privilege/ in comments/log messages and fix one typo in descriptor.andvar
2021-08-08introduce a SOL_LOCAL for unix-domain socket level socket optionsnia
as an alias of the current 0 used for these options, as in FreeBSD. reviewed by many.
2021-07-31s/dependend/dependent/andvar
2021-07-28Fix typos, improve wording.wiz
2021-07-27Tie the maximum file lock per unprivilegied uid to kern.maxfilesmanu
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.
2021-06-09vfork.2: clarify posix_spawn recommendation, pointed out by krenia
2021-06-08vfork.2: recommend posix_spawn insteadnia
2021-06-08Document NFSSVC_REPLACEEXPORTSLIST instead of NFSSVC_SETEXPORTSLIST.hannken
The latter is deprecated and kept only for backwards compatibility.
2021-03-28Document EINVAL for out of range socket address lengths.dholland
This is what happens, but wasn't documented. Applies to bind(2), connect(2), and send(2).
2021-03-27In getvfsstat(2), clarify that the size argument is in bytes.dholland
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.
2021-03-17Remove superfluous article.wiz
2021-03-17Clarify use of open flags in open(2).dholland
(Avoid using values of three that are equal to four.)
2021-02-17Merge EINVAL descriptions; replace Xr to itself with Nm.wiz
2021-02-17Document more EINVAL cases for fsync_range.dholland
Corresponds to previous code fix.
2021-02-13Document EINVAL for invalid flags given to fsync_range().dholland
2021-02-09Try improving readability in wrt negations.wiz
Use Nx. Remove trailing whitespace. Fix some typos.
2021-02-09Document in poll(2) that poll first appeared in NetBSD in NetBSD 1.3.dholland
2021-02-09typo in previous.dholland
2021-02-09Rework the text of poll(2) for clarity. Bump date.dholland
2021-02-08clarify what happens when kill(-1, ...) does nothingnia
2021-02-07poll.2: fix typo in manual pagerillig
2020-11-30Note that open(O_ASYNC) does not work as advertised.riastradh
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?)
2020-11-27Refine the documentationkamil
Sort includes. Correct the historical note, pipe first appeared in AT&T UNIX v3. Document ENOMEM.
2020-10-31add missing sentence.christos
2020-10-31Remove trailing whitespace.wiz
2020-10-31PR/55663: Ruslan Nikolaev: Add support for EVFILT_USER in kqueue(2)christos
2020-08-14New system call getrandom() compatible with Linux and others.riastradh
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
2020-07-17Remove trailing whitespace.wiz
2020-07-17Add ppoll() a compatibility wrapper around pollts(2)kamil
Submitted by Apurva Nandan.
2020-05-16Add ACL support for FFS. From FreeBSD.christos
2020-05-14Use more markup.wiz
2020-05-14Introduce new ptrace(2) operations: PT_SET_SIGPASS and PT_GET_SIGPASSkamil
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.