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

Re: misleading message for SIGFPE



On Tue, Sep 24, 2024 at 1:03 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> OTOH if there's a reason we're not using strsignal() when it's
> available, I've forgotten it.

I compared the output of zsh using sig_msg[] from signames.c to the
output of calling strsignal(), on Ubuntu 20.04.  For most signals
(including FPE) the difference is only whether the first character of
the error message is capitalized.  The messages that differed are
below (zsh first, strsignal following).  There is a USE_SUSPENDED
macro that determines the difference in the SIGT* signals.  Perhaps we
avoid strsignal() just for output compatibility with old zsh from
before that was available?

illegal hardware instruction (core dumped)
Illegal instruction (core dumped)

trace trap (core dumped)
Trace/breakpoint trap (core dumped)

abort (core dumped)
Aborted (core dumped)

alarm
Alarm clock

SIGSTKFLT
Stack fault

suspended (signal)
Stopped (signal)

suspended
Stopped

suspended (tty input)
Stopped (tty input)

suspended (tty output)
Stopped (tty output)

cpu limit exceeded (core dumped)
CPU time limit exceeded (core dumped)

virtual time alarm
Virtual timer expired

profile signal
Profiling timer expired

pollable event occurred
I/O possible

power fail
Power failure

invalid system call (core dumped)
Bad system call (core dumped)




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