about summary refs log tree commit diff
path: root/src/signal/siglongjmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal/siglongjmp.c')
-rw-r--r--src/signal/siglongjmp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/signal/siglongjmp.c b/src/signal/siglongjmp.c
index 600d560c..9b4a5398 100644
--- a/src/signal/siglongjmp.c
+++ b/src/signal/siglongjmp.c
@@ -1,12 +1,11 @@
 #include <setjmp.h>
 #include <signal.h>
 #include <stdlib.h>
+#include "syscall.h"
 
 void siglongjmp(sigjmp_buf buf, int ret)
 {
-	unsigned long *flag = buf + sizeof(jmp_buf)/sizeof(long) - 1;
-	sigset_t *mask = (void *)(flag + 1);
-	if (*flag)
-		sigprocmask (SIG_SETMASK, mask, NULL);
-	longjmp((void *)buf, ret);
+	if (buf->__fl)
+		__syscall(SYS_rt_sigprocmask, SIG_SETMASK, buf->__ss, 0, 8);
+	longjmp(buf->__jb, ret);
 }