]> git.sur5r.net Git - cc65/commitdiff
Reset signal handler to SIG_DFL on a call to raise()
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 14 Mar 2003 00:08:35 +0000 (00:08 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 14 Mar 2003 00:08:35 +0000 (00:08 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2018 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/common/raise.s

index 753def8a89a2cb6365331aed4449ad51e8585113..db96cdcd084fd9c6db6c5d3020a7ee69cfde3793 100644 (file)
@@ -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
 
+