[hackers] [sbase][PATCH] kill: handle TRAP signal

From: Randy Palamar <randy_AT_rnpnr.xyz>
Date: Mon, 9 Dec 2024 06:36:07 -0700

TRAP is a useful signal which when sent to a process currently
attached to a debugger causes the debugger to immediately break.
This is very helpful for programs running in some sort of run loop
where it may be difficult to set up a break point in an
appropriate location without modifying the source to include a
predicate condition.
---
 kill.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kill.c b/kill.c
index e3751a0..b09f55c 100644
--- a/kill.c
+++ b/kill.c
_AT_@ -18,7 +18,8 @@ struct {
 #define SIG(n) { #n, SIG##n }
 	SIG(ABRT), SIG(ALRM), SIG(BUS),  SIG(CHLD), SIG(CONT), SIG(FPE),  SIG(HUP),
 	SIG(ILL),  SIG(INT),  SIG(KILL), SIG(PIPE), SIG(QUIT), SIG(SEGV), SIG(STOP),
-	SIG(TERM), SIG(TSTP), SIG(TTIN), SIG(TTOU), SIG(USR1), SIG(USR2), SIG(URG),
+	SIG(TERM), SIG(TRAP), SIG(TSTP), SIG(TTIN), SIG(TTOU), SIG(USR1), SIG(USR2),
+	SIG(URG),
 #undef SIG
 };
 
-- 
2.45.2
Received on Mon Dec 09 2024 - 14:36:07 CET

This archive was generated by hypermail 2.3.0 : Mon Dec 09 2024 - 14:37:19 CET