From 5d7c87c8824315d2c0c4932de51811dc4836b284 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 14 Nov 2020 16:00:11 +0000 Subject: [PATCH] changed to use EPOLL_CLOEXEC if available when calling epoll_create1() --- hawk/lib/mod-sys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hawk/lib/mod-sys.c b/hawk/lib/mod-sys.c index 6fd85d6b..3efae9ad 100644 --- a/hawk/lib/mod-sys.c +++ b/hawk/lib/mod-sys.c @@ -3624,7 +3624,9 @@ static int fnc_openmux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) sys_list = rtx_to_sys_list(rtx, fi); #if defined(USE_EPOLL) - #if defined(HAVE_EPOLL_CREATE1) && defined(O_CLOEXEC) + #if defined(HAVE_EPOLL_CREATE1) && defined(EPOLL_CLOEXEC) + fd = epoll_create1(EPOLL_CLOEXEC); + #elif defined(HAVE_EPOLL_CREATE1) && defined(O_CLOEXEC) fd = epoll_create1(O_CLOEXEC); #else fd = epoll_create(4096);