1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
diff -ru herrie-2.1-orig/herrie-2.1/src/gui_input.c herrie-2.1-signals/herrie-2.1/src/gui_input.c
--- herrie-2.1-orig/herrie-2.1/src/gui_input.c 2008-07-15 10:59:07.000000000 -0500
+++ herrie-2.1-signals/herrie-2.1/src/gui_input.c 2008-07-18 09:44:41.000000000 -0500
@@ -521,6 +521,9 @@
sigset_t sset;
sigemptyset(&sset);
+ sigaddset(&sset, SIGRTMIN+1);
+ sigaddset(&sset, SIGRTMIN+2);
+ sigaddset(&sset, SIGRTMIN+3);
sigaddset(&sset, SIGUSR1);
sigaddset(&sset, SIGUSR2);
sigaddset(&sset, SIGHUP);
@@ -545,20 +548,29 @@
if (shutting_down)
return;
- switch (signal) {
- case SIGUSR1:
- playq_cursong_pause();
- break;
- case SIGUSR2:
- playq_cursong_next();
- break;
- case SIGHUP:
- case SIGINT:
- case SIGPIPE:
- case SIGQUIT:
- case SIGTERM:
- gui_input_quit();
- g_assert_not_reached();
+ if (signal == (SIGRTMIN+1)) { gui_playq_song_select(); }
+ else {
+ if (signal == (SIGRTMIN+2)) { playq_cursong_stop(); }
+ else {
+ if (signal == (SIGRTMIN+3)) { playq_cursong_prev(); }
+ else {
+ switch (signal) {
+ case SIGUSR1:
+ playq_cursong_pause();
+ break;
+ case SIGUSR2:
+ playq_cursong_next();
+ break;
+ case SIGHUP:
+ case SIGINT:
+ case SIGPIPE:
+ case SIGQUIT:
+ case SIGTERM:
+ gui_input_quit();
+ g_assert_not_reached();
+ }
+ }
+ }
}
}
#endif /* G_OS_UNIX */
@@ -570,6 +582,9 @@
unsigned int i;
#ifdef G_OS_UNIX
+ signal(SIGRTMIN+1, gui_input_sighandler);
+ signal(SIGRTMIN+2, gui_input_sighandler);
+ signal(SIGRTMIN+3, gui_input_sighandler);
signal(SIGUSR1, gui_input_sighandler);
signal(SIGUSR2, gui_input_sighandler);
signal(SIGHUP, gui_input_sighandler);
|