diff options
Diffstat (limited to 'src/signal')
-rw-r--r-- | src/signal/sigaction.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/signal/sigaction.c b/src/signal/sigaction.c index 79989500..ac9a3ac2 100644 --- a/src/signal/sigaction.c +++ b/src/signal/sigaction.c @@ -53,9 +53,9 @@ int __libc_sigaction(int sig, const struct sigaction *restrict sa, struct sigact ksa.handler = sa->sa_handler; ksa.flags = sa->sa_flags | SA_RESTORER; ksa.restorer = (sa->sa_flags & SA_SIGINFO) ? __restore_rt : __restore; - memcpy(&ksa.mask, &sa->sa_mask, sizeof ksa.mask); + memcpy(&ksa.mask, &sa->sa_mask, _NSIG/8); } - int r = __syscall(SYS_rt_sigaction, sig, sa?&ksa:0, old?&ksa_old:0, sizeof ksa.mask); + int r = __syscall(SYS_rt_sigaction, sig, sa?&ksa:0, old?&ksa_old:0, _NSIG/8); if (sig == SIGABRT && sa && sa->sa_handler != SIG_DFL) { UNLOCK(__abort_lock); __restore_sigs(&set); @@ -63,7 +63,7 @@ int __libc_sigaction(int sig, const struct sigaction *restrict sa, struct sigact if (old && !r) { old->sa_handler = ksa_old.handler; old->sa_flags = ksa_old.flags; - memcpy(&old->sa_mask, &ksa_old.mask, sizeof ksa_old.mask); + memcpy(&old->sa_mask, &ksa_old.mask, _NSIG/8); } return __syscall_ret(r); } |