OpenWrt – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | From 56893a61aa4f0270fa8d1197b9848247f90fce0d Mon Sep 17 00:00:00 2001 |
2 | From: Yousong Zhou <yszhou4tech@gmail.com> |
||
3 | Date: Fri, 24 Mar 2017 10:36:03 +0800 |
||
4 | Subject: [PATCH] Fix invalid sigprocmask call |
||
5 | |||
6 | The POSIX document says |
||
7 | |||
8 | The pthread_sigmask() and sigprocmask() functions shall fail if: |
||
9 | |||
10 | [EINVAL] |
||
11 | The value of the how argument is not equal to one of the defined values. |
||
12 | |||
13 | and this is how musl-libc is currently doing. Fix the call to be safe |
||
14 | and correct |
||
15 | |||
16 | [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html |
||
17 | |||
18 | gdb/ChangeLog: |
||
19 | 2017-03-24 Yousong Zhou <yszhou4tech@gmail.com> |
||
20 | |||
21 | * common/signals-state-save-restore.c (save_original_signals_state): |
||
22 | Fix invalid sigprocmask call. |
||
23 | --- |
||
24 | gdb/ChangeLog | 5 +++++ |
||
25 | gdb/common/signals-state-save-restore.c | 2 +- |
||
26 | 2 files changed, 6 insertions(+), 1 deletion(-) |
||
27 | |||
28 | --- a/gdb/common/signals-state-save-restore.c |
||
29 | +++ b/gdb/common/signals-state-save-restore.c |
||
3 | office | 30 | @@ -41,7 +41,7 @@ save_original_signals_state (void) |
1 | office | 31 | int i; |
32 | int res; |
||
33 | |||
34 | - res = sigprocmask (0, NULL, &original_signal_mask); |
||
35 | + res = sigprocmask (SIG_BLOCK, NULL, &original_signal_mask); |
||
36 | if (res == -1) |
||
37 | perror_with_name (("sigprocmask")); |
||
38 |