Merge branch 'use-cloexec-epoll' into 'main'

gio-unix: Use EPOLL_CLOEXEC by default

See merge request GNOME/glib!2868
This commit is contained in:
Matthias Clasen 2022-08-27 16:37:11 +00:00
commit 56236d708f

View File

@ -82,9 +82,9 @@ _g_fd_is_pollable (int fd)
struct epoll_event ev = { 0, };
gboolean add_succeeded;
efd = epoll_create (1);
efd = epoll_create1 (EPOLL_CLOEXEC);
if (efd == -1)
g_error ("epoll_create () failed: %s", g_strerror (errno));
g_error ("epoll_create1 () failed: %s", g_strerror (errno));
ev.events = EPOLLIN;