summaryrefslogtreecommitdiff
path: root/src/signal
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal')
-rw-r--r--src/signal/siglongjmp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/signal/siglongjmp.c b/src/signal/siglongjmp.c
index bc317acc..53789b23 100644
--- a/src/signal/siglongjmp.c
+++ b/src/signal/siglongjmp.c
@@ -5,5 +5,10 @@
_Noreturn void siglongjmp(sigjmp_buf buf, int ret)
{
+ /* If sigsetjmp was called with nonzero savemask flag, the address
+ * longjmp will return to is inside of sigsetjmp. The signal mask
+ * will then be restored in the returned-to context instead of here,
+ * which matters if the context we are returning from may not have
+ * sufficient stack space for signal delivery. */
longjmp(buf, ret);
}