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

SIGABRT/SIGIOT confusion under Linux

On Linux, the obscure SIGIOT signal, which hasn't really been meaningful on any machine since the PDP-11, is an alias for the common SIGABRT (signal 6). The system strsignal() function maps signal 6 to the expected description "Aborted". However, since zsh does its own translation, and since the SIGABRT precedes SIGIOT in Linux's <signal.h>, the latter overwrites the former in zsh's signal string tables. See Src/signames2.awk.

This has (at least) two unfortunate results:

1. When a command aborts by calling `abort()`, which raises SIGABRT, zsh emits the message "zsh: IOT instruction (core dumped)" which will surely mystify most users.

2. The `kill` builtin doesn't accept `-ABRT`. If you wanted to send the abort signal to a process, you would have to know to do `kill -IOT pid` instead, or `kill -6 pid` if you have the numbers memorized.

Tested with zsh 5.9 as distributed with Ubuntu 22.10 on x86-64, but the latest zsh source in git seems to not have changed.

Nate Eldredge

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