Displaying 2 results from an estimated 2 matches for "old_signal_mask".
2020 Aug 28
0
[klibc:ia64-signal-fix] ia64: sigaction: Make signal updates atomic
...a/usr/klibc/arch/ia64/sigaction.c
+++ b/usr/klibc/arch/ia64/sigaction.c
@@ -21,6 +21,7 @@ __extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *,
int __rt_sigaction(int sig, const struct sigaction *act,
struct sigaction *oact, size_t size)
{
+ sigset_t signal_mask, old_signal_mask;
uintptr_t old_entry;
int rv;
@@ -29,6 +30,13 @@ int __rt_sigaction(int sig, const struct sigaction *act,
return -1;
}
+ /* Mask the signal to avoid races on access to its descriptor */
+ sigemptyset(&signal_mask);
+ sigaddset(&signal_mask, sig);
+ rv = sigprocmask(SIG_BLOCK, &...
2020 Aug 29
0
[klibc:master] ia64: sigaction: Make signal updates atomic
...44
--- a/usr/klibc/arch/ia64/sigaction.c
+++ b/usr/klibc/arch/ia64/sigaction.c
@@ -21,6 +21,7 @@ __extern int ____rt_sigaction(int, const struct sigaction *, struct sigaction *,
int __rt_sigaction(int sig, struct sigaction *act,
struct sigaction *oact, size_t size)
{
+ sigset_t signal_mask, old_signal_mask;
uintptr_t old_entry;
int rv;
@@ -29,6 +30,13 @@ int __rt_sigaction(int sig, struct sigaction *act,
return -1;
}
+ /* Mask the signal to avoid races on access to its descriptor */
+ sigemptyset(&signal_mask);
+ sigaddset(&signal_mask, sig);
+ rv = sigprocmask(SIG_BLOCK, &si...