]> git.deb.at Git - pkg/beep.git/blobdiff - debian/patches/catch-sig-term
also catch SIGTERM for stopping the beep
[pkg/beep.git] / debian / patches / catch-sig-term
diff --git a/debian/patches/catch-sig-term b/debian/patches/catch-sig-term
new file mode 100644 (file)
index 0000000..8db0677
--- /dev/null
@@ -0,0 +1,23 @@
+Author: Jérôme <jerome@jolimont.fr>
+Description: also catch SIGTERM for stopping the beep
+
+Index: VCS/beep.c
+===================================================================
+--- VCS.orig/beep.c    2012-06-10 10:03:39.000000000 +0200
++++ VCS/beep.c 2012-06-10 10:03:59.000000000 +0200
+@@ -127,6 +127,7 @@
+   switch(signum) {
+   case SIGINT:
++  case SIGTERM:
+     if(console_fd >= 0) {
+       /* Kill the sound, quit gracefully */
+       do_beep(0);
+@@ -321,6 +322,7 @@
+   parms->next       = NULL;
+   signal(SIGINT, handle_signal);
++  signal(SIGTERM, handle_signal);
+   parse_command_line(argc, argv, parms);
+   /* this outermost while loop handles the possibility that -n/--new has been