summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDmitry Antipov <dantipov@cloudlinux.com>2022-10-25 11:30:34 +0300
committerAzat Khuzhin <azat@libevent.org>2022-11-12 21:14:48 +0100
commit1af745d033678333752afcd8724f5d6351561b4e (patch)
treeb67297abda6067ca1609c338f74bbcc07332730a /CMakeLists.txt
parent9e346936d47a3a461f8ebaedabb2975bef3babf5 (diff)
downloadlibevent-1af745d033678333752afcd8724f5d6351561b4e.tar.gz
signal: new signal handling backend based on signalfd
Linux-specific signal handling backend based on signalfd(2) system call, and public function event_base_get_signal_method() to obtain an underlying kernel signal handling mechanism. Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94fe4780..8a86b194 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -450,6 +450,7 @@ else()
sys/wait.h
sys/resource.h
sys/timerfd.h
+ sys/signalfd.h
netinet/in.h
netinet/in6.h
netinet/tcp.h
@@ -583,6 +584,7 @@ list(APPEND CMAKE_EXTRA_INCLUDE_FILES ${EVENT_INCLUDES} stdio.h)
CHECK_SYMBOLS_EXIST("${SYMBOLS_TO_CHECK}" "${CMAKE_EXTRA_INCLUDE_FILES}" "EVENT")
unset(SYMBOLS_TO_CHECK)
set(EVENT__HAVE_EPOLL ${EVENT__HAVE_EPOLL_CREATE})
+set(EVENT__HAVE_SIGNALFD ${EVENT__HAVE_SYS_SIGNALFD_H})
if(WIN32 AND NOT CYGWIN)
set(EVENT__HAVE_WEPOLL 1)
endif()
@@ -904,6 +906,10 @@ if(EVENT__HAVE_EPOLL)
list(APPEND SRC_CORE epoll.c)
endif()
+if(EVENT__HAVE_SIGNALFD)
+ list(APPEND SRC_CORE signalfd.c)
+endif()
+
if(EVENT__HAVE_WEPOLL)
list(APPEND SRC_CORE
epoll.c