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/libthr/pthread.map | |
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/libthr/pthread.map')
-rw-r--r-- | lib/libthr/pthread.map | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libthr/pthread.map b/lib/libthr/pthread.map index 355edea..bbbd930e 100644 --- a/lib/libthr/pthread.map +++ b/lib/libthr/pthread.map @@ -181,6 +181,7 @@ FBSDprivate_1.0 { ___wait; ___waitpid; __accept; + __accept4; __aio_suspend; __close; __connect; @@ -408,3 +409,7 @@ FBSD_1.2 { setcontext; swapcontext; }; + +FBSD_1.3 { + accept4; +}; |