Intercept division by zero with a fault handler.

This commit is contained in:
Brad Nelson
2023-01-04 21:17:49 -08:00
parent 3d1cf4b93c
commit b155e49a63

View File

@ -57,6 +57,7 @@ static cell_t *forth_run(cell_t *init_rp) {
sigaction(SIGSEGV, &sa, 0);
sigaction(SIGBUS, &sa, 0);
sigaction(SIGINT, &sa, 0);
sigaction(SIGFPE, &sa, 0);
#endif
return 0;
}