[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
Mon Feb 2 07:29:39 PST 2026
================
@@ -488,10 +505,11 @@ void llvm::sys::DontRemoveFileOnSignal(StringRef Filename) {
/// Add a function to be called when a signal is delivered to the process. The
/// handler can have a cookie passed to it to identify what instance of the
/// handler it is.
-void llvm::sys::AddSignalHandler(sys::SignalHandlerCallback FnPtr,
- void *Cookie) { // Signal-safe.
+void llvm::sys::AddSignalHandler(sys::SignalHandlerCallback FnPtr, void *Cookie,
+ bool IsClangDriver) {
----------------
daltenty wrote:
nit: I think this should be named for the intended effect, not the tool. That makes this more clear for other folks reading the code and way if other tools do want to opt-in to this behaviour it's straight forward.
```suggestion
bool NeedsPOSIXUtilitySignalHandling) {
```
https://github.com/llvm/llvm-project/pull/169340
More information about the cfe-commits
mailing list