From 89956cb0d66f24bfcee312dcd35f78b5dbc9e1b9 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 16 May 2021 19:56:11 +0200 Subject: Kernel+Userspace: Implement the accept4() system call Unlike accept() the new accept4() system call lets the caller specify flags for the newly accepted socket file descriptor, such as SOCK_CLOEXEC and SOCK_NONBLOCK. --- Kernel/API/Syscall.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Kernel/API/Syscall.h') diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index 2d4e839d35..80f6ce9747 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -99,7 +99,7 @@ namespace Kernel { S(chmod) \ S(socket) \ S(bind) \ - S(accept) \ + S(accept4) \ S(listen) \ S(connect) \ S(link) \ @@ -269,6 +269,13 @@ struct SC_clock_nanosleep_params { struct timespec* remaining_sleep; }; +struct SC_accept4_params { + int sockfd; + sockaddr* addr; + socklen_t* addrlen; + int flags; +}; + struct SC_getsockopt_params { int sockfd; int level; -- cgit v1.2.3