diff options
author | Rich Felker <dalias@aerifal.cx> | 2024-06-23 20:52:53 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2024-06-23 20:52:53 -0400 |
commit | 008f737ddf5de815ef7e26d195767d927c8c8e76 (patch) | |
tree | 122431d8f23b655f767c6f37e4907e62b2f5e535 /src | |
parent | 947b4574fa7998f027d3906e1f53acb9a7553c61 (diff) | |
download | musl-008f737ddf5de815ef7e26d195767d927c8c8e76.tar.gz |
siglongjmp: document why this function just calls longjmp
Diffstat (limited to 'src')
-rw-r--r-- | src/signal/siglongjmp.c | 5 |
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); } |