Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: misleading message for SIGFPE



On Tue, Sep 24, 2024 at 5:37 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> When a command is terminated by SIGFPE, I get a message saying
> "floating point exception" (this comes from Src/signames.c):

The "right way" to handle this would be to use the SIGFPE si_codes
from /usr/include/siginfo.h to break down the base signal into the
more-specific cases that cause it, but I'm not very familiar with
usage of siginfo or whether the parent process is able to obtain it
about the exiting child.  Anyone?

There are several other signals (e.g., SEGV, POLL) that have added
details available via siginfo.




Messages sorted by: Reverse Date, Date, Thread, Author