From: cuz Date: Fri, 14 Mar 2003 00:08:35 +0000 (+0000) Subject: Reset signal handler to SIG_DFL on a call to raise() X-Git-Tag: V2.12.0~1674 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=722581ecee47807c2d5d6e3b73f417e22fc4a197;p=cc65 Reset signal handler to SIG_DFL on a call to raise() git-svn-id: svn://svn.cc65.org/cc65/trunk@2018 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/common/raise.s b/libsrc/common/raise.s index 753def8a8..db96cdcd0 100644 --- a/libsrc/common/raise.s +++ b/libsrc/common/raise.s @@ -28,6 +28,15 @@ _raise: sta jmpvec+1 lda sigtable+1,x sta jmpvec+2 + +; Reset the signal handler to SIG_DFL (I don't like this because it may +; introduce race conditions, but it's the simplest way to satisfy the +; standard). + + lda #<__sig_dfl + sta sigtable,x + lda #>__sig_dfl + sta sigtable+1,x ; Restore the signal number and call the function @@ -42,3 +51,4 @@ _raise: invalidsig: rts +