about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-13 16:46:33 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-13 16:46:33 -0500
commite1d8d25a5024ec7832250e62825aab71ed8a253d (patch)
tree1bc6e99b6831b33a948ae5c8dbb95a9020c6cc14
parent0bcbb53dc492aae22039445bfdb609bd8d615992 (diff)
downloadmusl-e1d8d25a5024ec7832250e62825aab71ed8a253d.tar.gz
musl-e1d8d25a5024ec7832250e62825aab71ed8a253d.tar.xz
musl-e1d8d25a5024ec7832250e62825aab71ed8a253d.zip
fix omission that kept sa_restorer from being used
-rw-r--r--include/bits/signal.h1
-rw-r--r--src/signal/sigaction.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/bits/signal.h b/include/bits/signal.h
index 2427f37a..c0bb818b 100644
--- a/include/bits/signal.h
+++ b/include/bits/signal.h
@@ -48,6 +48,7 @@ struct __siginfo
 #define SA_RESTART    0x10000000
 #define SA_NODEFER    0x40000000
 #define SA_RESETHAND  0x80000000
+#define SA_RESTORER   0x04000000
 
 #define SS_ONSTACK    1
 #define SS_DISABLE    2
diff --git a/src/signal/sigaction.c b/src/signal/sigaction.c
index 4acd1730..9a362262 100644
--- a/src/signal/sigaction.c
+++ b/src/signal/sigaction.c
@@ -20,7 +20,7 @@ int __libc_sigaction(int sig, const struct sigaction *sa, struct sigaction *old)
 	long pksa=0, pkold=0;
 	if (sa) {
 		ksa.handler = sa->sa_handler;
-		ksa.flags = sa->sa_flags;
+		ksa.flags = sa->sa_flags | SA_RESTORER;
 		ksa.restorer = restorer;
 		ksa.mask = sa->sa_mask;
 		pksa = (long)&ksa;