musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/signal/sigaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal/sigaction.c')
-rw-r--r--src/signal/sigaction.c 7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/signal/sigaction.c b/src/signal/sigaction.c
index 9a362262..b1603b9f 100644
--- a/src/signal/sigaction.c
+++ b/src/signal/sigaction.c
@@ -4,10 +4,7 @@
#include "syscall.h"
#include "pthread_impl.h"
-static void restorer()
-{
- syscall0(__NR_rt_sigreturn);
-}
+void __restore(), __restore_rt();
int __libc_sigaction(int sig, const struct sigaction *sa, struct sigaction *old)
{
@@ -21,7 +18,7 @@ int __libc_sigaction(int sig, const struct sigaction *sa, struct sigaction *old)
if (sa) {
ksa.handler = sa->sa_handler;
ksa.flags = sa->sa_flags | SA_RESTORER;
- ksa.restorer = restorer;
+ ksa.restorer = (sa->sa_flags & SA_SIGINFO) ? __restore_rt : __restore;
ksa.mask = sa->sa_mask;
pksa = (long)&ksa;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月03日 19:42:23 +0000

AltStyle によって変換されたページ (->オリジナル) /