]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/beep/0004-also-catch-SIGTERM-for-stopping-the-beep.patch
beep 1.3: Fixes for CVE-2018-0492
[ipfire-2.x.git] / src / patches / beep / 0004-also-catch-SIGTERM-for-stopping-the-beep.patch
1 From e1320c1da52ca92aa68b4224f9532982184fbe00 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=A9r=C3=B4me?= <jerome@jolimont.fr>
3 Date: Thu, 7 Feb 2013 12:54:53 +0100
4 Subject: [PATCH] also catch SIGTERM for stopping the beep
5
6 Signed-off-by: Gerfried Fuchs <rhonda@deb.at>
7 ---
8 beep.c | 2 ++
9 1 file changed, 2 insertions(+)
10
11 diff --git a/beep.c b/beep.c
12 index 452fc08..9cb63bf 100644
13 --- a/beep.c
14 +++ b/beep.c
15 @@ -130,6 +130,7 @@ void handle_signal(int signum) {
16
17 switch(signum) {
18 case SIGINT:
19 + case SIGTERM:
20 if(console_fd >= 0) {
21 /* Kill the sound, quit gracefully */
22 do_beep(0);
23 @@ -324,6 +325,7 @@ int main(int argc, char **argv) {
24 parms->next = NULL;
25
26 signal(SIGINT, handle_signal);
27 + signal(SIGTERM, handle_signal);
28 parse_command_line(argc, argv, parms);
29
30 /* this outermost while loop handles the possibility that -n/--new has been
31 --
32 2.7.5