mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
os: wrap accept4(SOCK_CLOEXEC)
Some system C libraries do not have SOCK_CLOEXEC, and completely miss accept4(), too. Provide a fallback for this case. This changes the behaviour: no error messages are printed now for failing to set CLOEXEC but the file descriptor is closed. The unit test for this wrapper is NOT included. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
b2eaf870cf
commit
ff50f6bfc4
5 changed files with 29 additions and 8 deletions
|
|
@ -35,6 +35,9 @@ wl_os_recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags);
|
|||
int
|
||||
wl_os_epoll_create_cloexec(void);
|
||||
|
||||
int
|
||||
wl_os_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
|
||||
|
||||
|
||||
/*
|
||||
* The following are for wayland-os.c and the unit tests.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue