From 8a90fc8566322ab5f4f031368c394814a35cba3f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 11 Feb 2026 07:33:09 +0000
Subject: [PATCH 01/12] Initial plan
From 2f34cf93cfcbaaecff89a9ccce4f51f52b478cbc Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 11 Feb 2026 07:39:05 +0000
Subject: [PATCH 02/12] Add SIGKILL enumeration value and validation
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
---
.../System.Private.CoreLib/src/Resources/Strings.resx | 3 +++
.../src/System/Runtime/InteropServices/PosixSignal.cs | 6 +++++-
.../Runtime/InteropServices/PosixSignalRegistration.cs | 5 +++++
.../ref/System.Runtime.InteropServices.cs | 2 ++
.../InteropServices/PosixSignalRegistrationTests.Unix.cs | 7 ++++++-
.../InteropServices/PosixSignalRegistrationTests.cs | 6 ++++++
src/native/libs/System.Native/pal_signal.c | 7 +++++++
src/native/libs/System.Native/pal_signal.h | 3 ++-
8 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
index f511ebeb21810d..4089e9f65fe517 100644
--- a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
+++ b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
@@ -259,6 +259,9 @@
The usage of IKeyComparer and IHashCodeProvider/IComparer interfaces cannot be mixed; use one or the other.
+
+ Cannot register a handler for SIGKILL.
+
Attempt to unload the AppDomain failed.
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignal.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignal.cs
index e1f278fbd6f557..cc047934908651 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignal.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignal.cs
@@ -42,6 +42,10 @@ public enum PosixSignal
/// Stop typed at terminal
[UnsupportedOSPlatform("windows")]
- SIGTSTP = -10
+ SIGTSTP = -10,
+
+ /// Kill (cannot be caught or ignored)
+ [UnsupportedOSPlatform("windows")]
+ SIGKILL = -11
}
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignalRegistration.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignalRegistration.cs
index a804ae68486cbc..a384d2eeb1da5f 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignalRegistration.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignalRegistration.cs
@@ -39,6 +39,11 @@ public static PosixSignalRegistration Create(PosixSignal signal, Action UninstallableSignals()
public static IEnumerable