commit d6abbee: [Minor] Do not use `setproctitle` on Linux

Vsevolod Stakhov vsevolod at rspamd.com
Sat Oct 14 13:21:03 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-10-14 14:15:22 +0100
URL: https://github.com/rspamd/rspamd/commit/d6abbee4d1bb09ca4c8811968207dcdc6619a2e9 (HEAD -> master)

[Minor] Do not use `setproctitle` on Linux
Issue: #4634

---
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f9c807e9..673806bd3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -315,7 +315,10 @@ CHECK_INCLUDE_FILES(ucontext.h HAVE_UCONTEXT_H)
 CHECK_INCLUDE_FILES(sys/ucontext.h HAVE_SYS_UCONTEXT_H) # OSX specific
 
 # Check platform API
-CHECK_FUNCTION_EXISTS(setproctitle HAVE_SETPROCTITLE)
+IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    # setproctitle is broken badly in Linux, never try it
+    CHECK_FUNCTION_EXISTS(setproctitle HAVE_SETPROCTITLE)
+ENDIF()
 CHECK_FUNCTION_EXISTS(getpagesize HAVE_GETPAGESIZE)
 CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP)
 CHECK_FUNCTION_EXISTS(flock HAVE_FLOCK)


More information about the Commits mailing list