]> git.deb.at Git - pkg/beep.git/blob - debian/patches/catch-sig-term
also catch SIGTERM for stopping the beep
[pkg/beep.git] / debian / patches / catch-sig-term
1 Author: Jérôme <jerome@jolimont.fr>
2 Description: also catch SIGTERM for stopping the beep
3
4 Index: VCS/beep.c
5 ===================================================================
6 --- VCS.orig/beep.c     2012-06-10 10:03:39.000000000 +0200
7 +++ VCS/beep.c  2012-06-10 10:03:59.000000000 +0200
8 @@ -127,6 +127,7 @@
9  
10    switch(signum) {
11    case SIGINT:
12 +  case SIGTERM:
13      if(console_fd >= 0) {
14        /* Kill the sound, quit gracefully */
15        do_beep(0);
16 @@ -321,6 +322,7 @@
17    parms->next       = NULL;
18  
19    signal(SIGINT, handle_signal);
20 +  signal(SIGTERM, handle_signal);
21    parse_command_line(argc, argv, parms);
22  
23    /* this outermost while loop handles the possibility that -n/--new has been