1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From: =?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Fri, 10 Jan 2025 16:13:55 +0100
Subject: Re-raise deadly signals instead of ignoring them (Closes: #308627)
---
sredird.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/sredird.c b/sredird.c
index 663d0db..33bffbf 100644
--- a/sredird.c
+++ b/sredird.c
@@ -629,6 +629,8 @@ void SignalFunction(int unused)
/* Same as the exit function */
ExitFunction();
+ signal(unused, SIG_DFL);
+ raise(unused);
}
/* Function called on break signal */
@@ -636,13 +638,7 @@ void SignalFunction(int unused)
void BreakFunction(int unused)
{
#ifndef COMMENT
- /* Just to avoid compilation warnings */
- /* There's no performance penalty in doing this
- because this function is almost never called */
- unused = unused;
-
- /* Same as the exit function */
- ExitFunction();
+ SignalFunction(unused);
#else /* COMMENT */
unsigned char LineState;
|