aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2013-05-01 20:10:21 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2013-05-01 20:10:21 +0000
commitda7d2afb6d25a50559173e51f4b3044656a587fb (patch)
treec530c7ecc418cacfa14b49c004393242e6613d6b /sys/kern/syscalls.master
parent14f525595c1235aaee36ef161eb45ed2372089aa (diff)
downloadsrc-da7d2afb6d25a50559173e51f4b3044656a587fb.tar.gz
src-da7d2afb6d25a50559173e51f4b3044656a587fb.zip
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.
Notes
Notes: svn path=/head/; revision=250154
Diffstat (limited to 'sys/kern/syscalls.master')
-rw-r--r--sys/kern/syscalls.master4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 4b3348f83e31..922db305f049 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -972,5 +972,9 @@
int namelen); }
540 AUE_CHFLAGSAT STD { int chflagsat(int fd, const char *path, \
u_long flags, int atflag); }
+541 AUE_ACCEPT STD { int accept4(int s, \
+ struct sockaddr * __restrict name, \
+ __socklen_t * __restrict anamelen, \
+ int flags); }
; Please copy any additions and changes to the following compatability tables:
; sys/compat/freebsd32/syscalls.master