merge setuid variants
[trinity.git] / syscalls / accept4.c
blobccf5b4a361f92b42ce4c915165561487cde6ea18
1 /*
2 * SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
3 int __user *, upeer_addrlen, int, flags)
5 * On success, these system calls return a nonnegative integer that is a descriptor for the accepted socket.
6 * On error, -1 is returned, and errno is set appropriately.
8 */
10 #define SOCK_CLOEXEC 02000000
11 #define SOCK_NONBLOCK 04000
13 #include "sanitise.h"
15 struct syscallentry syscall_accept4 = {
16 .name = "accept4",
17 .num_args = 4,
18 .arg1name = "fd",
19 .arg1type = ARG_FD,
20 .arg2name = "upeer_sockaddr",
21 .arg2type = ARG_SOCKADDR,
22 .arg3name = "upeer_addrlen",
23 .arg3type = ARG_SOCKADDRLEN,
24 .arg4name = "flags",
25 .arg4type = ARG_LIST,
26 .arg4list = {
27 .num = 2,
28 .values = { SOCK_NONBLOCK, SOCK_CLOEXEC },
30 .rettype = RET_FD,
31 .flags = NEED_ALARM,