]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blob - multipath-tools/patches/0043-RH-signal-waiter.patch
glibc: Disable multilib support on X86_64
[people/stevee/ipfire-3.x.git] / multipath-tools / patches / 0043-RH-signal-waiter.patch
1 ---
2 libmultipath/waiter.c | 9 +++++++++
3 multipathd/main.c | 8 ++++++++
4 2 files changed, 17 insertions(+)
5
6 Index: multipath-tools-130222/libmultipath/waiter.c
7 ===================================================================
8 --- multipath-tools-130222.orig/libmultipath/waiter.c
9 +++ multipath-tools-130222/libmultipath/waiter.c
10 @@ -57,6 +57,7 @@ void stop_waiter_thread (struct multipat
11 thread = mpp->waiter;
12 mpp->waiter = (pthread_t)0;
13 pthread_cancel(thread);
14 + pthread_kill(thread, SIGUSR2);
15 }
16
17 /*
18 @@ -65,6 +66,7 @@ void stop_waiter_thread (struct multipat
19 */
20 int waiteventloop (struct event_thread *waiter)
21 {
22 + sigset_t set, oldset;
23 int event_nr;
24 int r;
25
26 @@ -97,8 +99,15 @@ int waiteventloop (struct event_thread *
27 dm_task_no_open_count(waiter->dmt);
28
29 /* wait */
30 + sigemptyset(&set);
31 + sigaddset(&set, SIGUSR2);
32 + pthread_sigmask(SIG_UNBLOCK, &set, &oldset);
33 +
34 + pthread_testcancel();
35 r = dm_task_run(waiter->dmt);
36 + pthread_testcancel();
37
38 + pthread_sigmask(SIG_SETMASK, &oldset, NULL);
39 dm_task_destroy(waiter->dmt);
40 waiter->dmt = NULL;
41
42 Index: multipath-tools-130222/multipathd/main.c
43 ===================================================================
44 --- multipath-tools-130222.orig/multipathd/main.c
45 +++ multipath-tools-130222/multipathd/main.c
46 @@ -1506,6 +1506,12 @@ sigusr1 (int sig)
47 }
48
49 static void
50 +sigusr2 (int sig)
51 +{
52 + condlog(3, "SIGUSR2 received");
53 +}
54 +
55 +static void
56 signal_init(void)
57 {
58 sigset_t set;
59 @@ -1513,10 +1519,12 @@ signal_init(void)
60 sigemptyset(&set);
61 sigaddset(&set, SIGHUP);
62 sigaddset(&set, SIGUSR1);
63 + sigaddset(&set, SIGUSR2);
64 pthread_sigmask(SIG_BLOCK, &set, NULL);
65
66 signal_set(SIGHUP, sighup);
67 signal_set(SIGUSR1, sigusr1);
68 + signal_set(SIGUSR2, sigusr2);
69 signal_set(SIGINT, sigend);
70 signal_set(SIGTERM, sigend);
71 signal(SIGPIPE, SIG_IGN);