[clang] [clang-tools-extra] [llvm] [LLVM][CLANG] Update signal-handling behavior to comply with POSIX (PR #169340)
David Tenty via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 4 09:07:55 PST 2026
================
@@ -99,8 +99,16 @@ using SignalHandlerCallback = void (*)(void *);
/// Add a function to be called when an abort/kill signal is delivered to the
/// process. The handler can have a cookie passed to it to identify what
-/// instance of the handler it is.
+/// instance of the handler it is. On Unix systems, the
+/// NeedsPOSIXUtilitySignalHandling argument indicates whether POSIX signal
+/// handling semantics are followed, so that the signal handler resignals
+/// itself to terminate after handling the signal.
+#ifdef _WIN32
LLVM_ABI void AddSignalHandler(SignalHandlerCallback FnPtr, void *Cookie);
----------------
daltenty wrote:
Since this function is external ABI facing, I'm inclined to say the interface should be the same on all platforms (even if the additional param is a no-op for non-UNIX targets) or the user code will have to handle the difference.
https://github.com/llvm/llvm-project/pull/169340
More information about the cfe-commits
mailing list