diff options
author | jilles <jilles@FreeBSD.org> | 2013-05-01 20:10:21 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-05-01 20:10:21 +0000 |
commit | 299afd25fd6dead39bf5c78572782db885579911 (patch) | |
tree | c530c7ecc418cacfa14b49c004393242e6613d6b /lib/libc/sys/Makefile.inc | |
parent | 19e5409088a95e1f704e9a1b2e7737b3e76608e9 (diff) | |
download | FreeBSD-src-299afd25fd6dead39bf5c78572782db885579911.zip FreeBSD-src-299afd25fd6dead39bf5c78572782db885579911.tar.gz |
Add accept4() system call.
The accept4() function, compared to accept(), allows setting the new file
descriptor atomically close-on-exec and explicitly controlling the
non-blocking status on the new socket. (Note that the latter point means
that accept() is not equivalent to any form of accept4().)
The linuxulator's accept4 implementation leaves a race window where the new
file descriptor is not close-on-exec because it calls sys_accept(). This
implementation leaves no such race window (by using falloc() flags). The
linuxulator could be fixed and simplified by using the new code.
Like accept(), accept4() is async-signal-safe, a cancellation point and
permitted in capability mode.
Diffstat (limited to 'lib/libc/sys/Makefile.inc')
-rw-r--r-- | lib/libc/sys/Makefile.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index fef0f3c..105f469 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -270,6 +270,7 @@ MAN+= sctp_generic_recvmsg.2 \ wait.2 \ write.2 +MLINKS+=accept.2 accept4.2 MLINKS+=access.2 eaccess.2 \ access.2 faccessat.2 MLINKS+=brk.2 sbrk.2 |