Explorar el Código

Install handlers for standard Oberon traps

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7560 8c9fc860-2736-0410-a75d-ab315db34111
negelef hace 7 años
padre
commit
c8de143576
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      source/Generic.Unix.Traps.Mod

+ 5 - 0
source/Generic.Unix.Traps.Mod

@@ -258,5 +258,10 @@ BEGIN
 	trapMutex := Unix.NewRecursiveMtx( );
 	trace := FALSE;  
 	Unix.InstallTrap( Trap );
+	Unix.HandleSignal( 4 ); (* SIGILL: illegal instruction *)
+	Unix.HandleSignal( 5 ); (* SIGTRAP: exception *)
+	Unix.HandleSignal( 7 ); (* SIGBUS: bus error *)
+	Unix.HandleSignal( 8 ); (* SIGFPE: erroneous arithmetics *)
+	Unix.HandleSignal( 11 ); (* SIGSEGV: segmentation fault *)
 	unix := StdIO.env
 END Traps.