From a3fe66f213299246e9b1189d9cd92d46ba6f1f4b Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Fri, 13 Jun 2025 22:19:03 -0400 Subject: [PATCH] build: remove HAVE_PTHREAD_SIGNAL define it was forced on --- cmake/Libraries.cmake | 1 - src/lib/Config.h.in | 3 --- src/lib/arch/unix/ArchMultithreadPosix.cpp | 13 ------------- 3 files changed, 17 deletions(-) diff --git a/cmake/Libraries.cmake b/cmake/Libraries.cmake index 062d184b4..eaf1cce4d 100644 --- a/cmake/Libraries.cmake +++ b/cmake/Libraries.cmake @@ -158,7 +158,6 @@ macro(configure_unix_libs) # For config.h, set some static values; it may be a good idea to make these # values dynamic for non-standard UNIX compilers. - set(HAVE_PTHREAD_SIGNAL 1) set(HAVE_SOCKLEN_T 1) # Unix only: For config.h, save the results based on a template (config.h.in). diff --git a/src/lib/Config.h.in b/src/lib/Config.h.in index e3f63d2e0..82c6b11e4 100644 --- a/src/lib/Config.h.in +++ b/src/lib/Config.h.in @@ -16,9 +16,6 @@ /* Define if you have POSIX threads libraries and header files. */ #cmakedefine HAVE_PTHREAD @HAVE_PTHREAD@ -/* Define if you have `pthread_sigmask` and `pthread_kill` functions. */ -#cmakedefine HAVE_PTHREAD_SIGNAL @HAVE_PTHREAD_SIGNAL@ - /* Define if your compiler defines socklen_t. */ #cmakedefine HAVE_SOCKLEN_T @HAVE_SOCKLEN_T@ diff --git a/src/lib/arch/unix/ArchMultithreadPosix.cpp b/src/lib/arch/unix/ArchMultithreadPosix.cpp index 96c5405e8..1d5d393d8 100644 --- a/src/lib/arch/unix/ArchMultithreadPosix.cpp +++ b/src/lib/arch/unix/ArchMultithreadPosix.cpp @@ -17,17 +17,6 @@ #define SIGWAKEUP SIGUSR1 -#if !HAVE_PTHREAD_SIGNAL -// boy, is this platform broken. forget about pthread signal -// handling and let signals through to every process. deskflow -// will not terminate cleanly when it gets SIGTERM or SIGINT. -#define pthread_sigmask sigprocmask -#define pthread_kill(tid_, sig_) kill(0, (sig_)) -#define sigwait(set_, sig_) -#undef HAVE_POSIX_SIGWAIT -#define HAVE_POSIX_SIGWAIT 1 -#endif - static void setSignalSet(sigset_t *sigset) { sigemptyset(sigset); @@ -300,9 +289,7 @@ ArchThread ArchMultithreadPosix::newThread(ThreadFunc func, void *data) // can't tell the difference. if (!m_newThreadCalled) { m_newThreadCalled = true; -#if HAVE_PTHREAD_SIGNAL startSignalHandler(); -#endif } lockMutex(m_threadMutex);