Hrvoje Niksic <hniksic(a)srce.hr> writes:
(In fact, on *real* Unixes, we could simply use sigaction() to trap
SIGSEGV and have the handler check whether the SEGV was caused by
modifying a pure cons, and signal an error in that case. Of course,
this would not work on Linux.)
I'm not sure if trapping SIGSEGV would work on all "real"
Unixes. According to sigaction(2) on Linux:
"According to POSIX, the behaviour of a process is undefined after it
ignores a SIGFPE, SIGILL, or SIGSEGV signal that was not generated by
the kill() or the raise() functions."
-Toreo
--
Oy!