summaryrefslogtreecommitdiffstats
path: root/LOCKS
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-05-01 20:10:21 +0000
committerjilles <jilles@FreeBSD.org>2013-05-01 20:10:21 +0000
commit299afd25fd6dead39bf5c78572782db885579911 (patch)
treec530c7ecc418cacfa14b49c004393242e6613d6b /LOCKS
parent19e5409088a95e1f704e9a1b2e7737b3e76608e9 (diff)
downloadFreeBSD-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 'LOCKS')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud