Browse Source

* also install sig handlers for sigill,sigbus

peter 24 years ago
parent
commit
ee148aeb6c
1 changed files with 14 additions and 5 deletions
  1. 14 5
      rtl/unix/sysunix.inc

+ 14 - 5
rtl/unix/sysunix.inc

@@ -595,7 +595,8 @@ var
 begin
 begin
   res:=0;
   res:=0;
   case sig of
   case sig of
-    8 : begin
+    SIGFPE :
+      begin
     { this is not allways necessary but I don't know yet
     { this is not allways necessary but I don't know yet
       how to tell if it is or not PM }
       how to tell if it is or not PM }
 {$ifdef I386}
 {$ifdef I386}
@@ -634,7 +635,10 @@ begin
 {$endif I386}
 {$endif I386}
           ResetFPU;
           ResetFPU;
         end;
         end;
-   11 : res:=216;
+   SIGILL,
+   SIGBUS,
+   SIGSEGV :
+        res:=216;
   end;
   end;
 { give runtime error at the position where the signal was raised }
 { give runtime error at the position where the signal was raised }
   if res<>0 then
   if res<>0 then
@@ -666,8 +670,10 @@ const
                                          VAR is removed}
                                          VAR is removed}
 begin
 begin
   ResetFPU;
   ResetFPU;
-  SigAction(8,@act,oldact);
-  SigAction(11,@act,oldact);
+  SigAction(SIGFPE,@act,oldact);
+  SigAction(SIGSEGV,@act,oldact);
+  SigAction(SIGBUS,@act,oldact);
+  SigAction(SIGILL,@act,oldact);
 end;
 end;
 
 
 
 
@@ -747,7 +753,10 @@ End.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2001-04-13 22:39:05  peter
+  Revision 1.10  2001-04-23 20:33:31  peter
+    * also install sig handlers for sigill,sigbus
+
+  Revision 1.9  2001/04/13 22:39:05  peter
     * removed warning
     * removed warning
 
 
   Revision 1.8  2001/04/12 17:53:43  peter
   Revision 1.8  2001/04/12 17:53:43  peter