> When I trigger a division by zero the handler is not called, I just
> get trap 19 message.
if i do a floating-point division by zero, the SIGFPE signal handler is called,
because ape's signal recognises the initial "sys: fp: ". (ie, it works for me.)
it doesn't work for an integer division by zero, which produces a different
message for the underlying notify:
8.out 205840: suicide: sys: trap: divide error pc=0x00001089
but that's fine too! Linux's signal(2) says, apparently referring to POSIX
rules:
.... Integer division by zero has undefined result.
On some architectures it will generate a SIGFPE signal. (Also dividing
the most negative integer by -1 may generate SIGFPE.) Ignoring this
signal might lead to an endless loop.
Linux might not be particularly good at documenting this particular area,
so perhaps the standard(s) have useful hints or advice that APE could follow.