fix failure of mbsrtowcs to record stop position when dest is full
[musl] / src / signal / raise.c
index c0814fa..6fa43be 100644 (file)
@@ -8,10 +8,10 @@ int raise(int sig)
 {
        int pid, tid, ret;
        sigset_t set;
-       __syscall(SYS_rt_sigprocmask, SIG_BLOCK, SIGALL_SET, &set, __SYSCALL_SSLEN);
-       tid = syscall(SYS_gettid);
-       pid = syscall(SYS_getpid);
+       __block_app_sigs(&set);
+       tid = __syscall(SYS_gettid);
+       pid = __syscall(SYS_getpid);
        ret = syscall(SYS_tgkill, pid, tid, sig);
-       __syscall(SYS_rt_sigprocmask, SIG_SETMASK, &set, 0, __SYSCALL_SSLEN);
+       __restore_sigs(&set);
        return ret;
 }