mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 07:40:24 +00:00
Add signal handler to catch SIGFPE (division by 0) on linux.
This commit is contained in:
parent
22dcf8b799
commit
0f82a86131
|
@ -2079,6 +2079,12 @@ if(alGetError() != AL_NO_ERROR) exit(444);
|
|||
#ifdef QB64_WINDOWS
|
||||
signal(SIGFPE, division_by_zero_handler);
|
||||
//signal(SIGSEGV, SIGSEGV_handler);
|
||||
#else
|
||||
struct sigaction sig_act;
|
||||
sig_act.sa_handler = division_by_zero_handler;
|
||||
sigemptyset(&(sig_act.sa_mask));
|
||||
sig_act.sa_flags = 0;
|
||||
sigaction(SIGFPE, &sig_act, NULL);
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue