]> git.deb.at Git - pkg/beep.git/blob - debian/patches/catch-sig-term
CVE-2018-0492
[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 --- beep-1.3.orig/beep.c
5 +++ beep-1.3/beep.c
6 @@ -127,6 +127,7 @@ void handle_signal(int signum) {
7  
8    switch(signum) {
9    case SIGINT:
10 +  case SIGTERM:
11      if(console_fd >= 0) {
12        /* Kill the sound, quit gracefully */
13        do_beep(0);
14 @@ -321,6 +322,7 @@ int main(int argc, char **argv) {
15    parms->next       = NULL;
16  
17    signal(SIGINT, handle_signal);
18 +  signal(SIGTERM, handle_signal);
19    parse_command_line(argc, argv, parms);
20  
21    /* this outermost while loop handles the possibility that -n/--new has been