Hrvoje Niksic wrote:
> Try the following instead.
[...]
Cool, thanks. It would be nice if Linux allowed you to use the SVR4
sigaction() interface to achieve this kind of thing.
Looking at the sourc and header files for 2.2.0-pre8, the SVR4
SA_SIGINFO option appears to be either supported, or planned to be
supported.
I didn't succeed in getting your test program to work, although I
didn't try particularly hard. I'm wondering if the SA_SIGINFO support
requires glibc 2.1.
In any case, Stevens indicates that BSD doesn't use the SVR4 approach,
and older versions of Linux clearly don't, so I reckon that any
support for determining the fault address would need to support
platform-specific variations.
--
Glynn Clements <glynn(a)sensei.co.uk>