mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
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.
This commit is contained in:
parent
529f605ac8
commit
89956cb0d6
7 changed files with 49 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue