diff options
Diffstat (limited to 'setjmp/longjmp.c')
-rw-r--r-- | setjmp/longjmp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/setjmp/longjmp.c b/setjmp/longjmp.c index d4e4ef7..c70be7b 100644 --- a/setjmp/longjmp.c +++ b/setjmp/longjmp.c @@ -21,12 +21,17 @@ Cambridge, MA 02139, USA. */ #include <signal.h> +extern void _longjmp_unwind (jmp_buf env, int val); + /* Set the signal mask to the one specified in ENV, and jump to the position specified in ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ void longjmp (sigjmp_buf env, int val) { + /* Perform any cleanups needed by the frames being unwound. */ + _longjmp_unwind (env, val); + if (env[0].__mask_was_saved) /* Restore the saved signal mask. */ (void) __sigprocmask (SIG_SETMASK, &env[0].__saved_mask, |