]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/beep/0004-also-catch-SIGTERM-for-stopping-the-beep.patch
reiserfsprogs: Update to 3.6.27
[ipfire-2.x.git] / src / patches / beep / 0004-also-catch-SIGTERM-for-stopping-the-beep.patch
CommitLineData
4217b4b6
MF
1From e1320c1da52ca92aa68b4224f9532982184fbe00 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=A9r=C3=B4me?= <jerome@jolimont.fr>
3Date: Thu, 7 Feb 2013 12:54:53 +0100
4Subject: [PATCH] also catch SIGTERM for stopping the beep
5
6Signed-off-by: Gerfried Fuchs <rhonda@deb.at>
7---
8 beep.c | 2 ++
9 1 file changed, 2 insertions(+)
10
11diff --git a/beep.c b/beep.c
12index 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--
322.7.5