about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-06 20:43:39 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-06 20:43:39 -0400
commit6682ed1e744dab88f22b9188e3be5746abbae06e (patch)
treec28d123ddeddddbe10793a2f7214fa6597d8c295
parentc2cd25bff89c3581780e7eb267262cb8c4da0d38 (diff)
downloadmusl-6682ed1e744dab88f22b9188e3be5746abbae06e.tar.gz
musl-6682ed1e744dab88f22b9188e3be5746abbae06e.tar.xz
musl-6682ed1e744dab88f22b9188e3be5746abbae06e.zip
fixed crash in new rsyscall (failure to set sa_flags for signal handler)
-rw-r--r--src/thread/__rsyscall.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/thread/__rsyscall.c b/src/thread/__rsyscall.c
index 923db2bf..61d41df7 100644
--- a/src/thread/__rsyscall.c
+++ b/src/thread/__rsyscall.c
@@ -61,12 +61,14 @@ int __rsyscall(int nr, long a, long b, long c, long d, long e, long f)
 
 	if (!rs.init) {
 		struct sigaction sa = {
+			.sa_flags = SA_SIGINFO | SA_RESTART,
 			.sa_sigaction = rsyscall_handler,
 			.sa_mask = set
 		};
 		sigfillset(&sa.sa_mask);
 		sa.sa_sigaction = rsyscall_handler;
 		__libc_sigaction(SIGSYSCALL, &sa, 0);
+		rs.init = 1;
 	}
 
 	rs.nr = nr;