Skip to content
Snippets Groups Projects
Commit 2f1239a2 authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1997-08-25 12:28:27 by simonm]

Fix problem with installing signal handlers on FreeBSD.
Symptom: occasional reports of 'cannot install SEGV handler...',
sometimes when the Haskell program calls 'error'.
parent 1cc941b7
No related merge requests found
......@@ -163,7 +163,9 @@ install_segv_handler(void)
/* FreeBSD seems to generate SIGBUS for stack overflows */
if (signal(SIGBUS, segv_handler) == SIG_ERR)
return -1;
return ((int) signal(SIGSEGV, segv_handler));
if (signal(SIGSEGV, segv_handler) == SIG_ERR)
return -1;
return 0;
#else
return ((int) signal(SIGSEGV, segv_handler) == SIG_ERR);
/* I think the "== SIG_ERR" is saying "there was no
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment