From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: Handle SIGIOT as an alias to SIGABRT if they are the same signal number
Date: Sun, 26 Mar 2023 10:28:53 +0200 [thread overview]
Message-ID: <20230326082853.10215-1-mikachu@gmail.com> (raw)
In-Reply-To: <3ac2df17-56b4-be10-b3ba-f27af8d1c47a@thatsmathematics.com>
There is already similar handling for SIGCLD/SIGCHLD and SIGIO/SIGPOLL
(see 20566 and 20572), so extend this to handle SIGIOT and SIGABRT the
same way.
---
Src/jobs.c | 5 +++++
Src/signames2.awk | 9 +++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Src/jobs.c b/Src/jobs.c
index 2dfcefb33a..429ee2a326 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -2645,6 +2645,11 @@ static const struct {
{ "IO", SIGIO },
#endif
#endif
+#if defined(SIGABRT) && defined(SIGIOT)
+#if SIGABRT == SIGIOT
+ { "IOT", SIGIOT },
+#endif
+#endif
#if !defined(SIGERR)
/*
* If SIGERR is not defined by the operating system, use it
diff --git a/Src/signames2.awk b/Src/signames2.awk
index 4d15681d58..4d1557cd8d 100644
--- a/Src/signames2.awk
+++ b/Src/signames2.awk
@@ -13,7 +13,8 @@
signam = substr(tmp[1], 4, 20)
signum = tmp[2]
if (signam == "CHLD" && sig[signum] == "CLD") sig[signum] = ""
- if (signam == "POLL" && sig[signum] == "IO") sig[signum] = ""
+ if (signam == "POLL" && sig[signum] == "IO") sig[signum] = ""
+ if (signam == "ABRT" && sig[signum] == "IOT") sig[signum] = ""
if (sig[signum] == "") {
sig[signum] = signam
if (0 + max < 0 + signum && signum < 60)
@@ -33,9 +34,9 @@
if (signam == "IO") { msg[signum] = "i/o ready" }
if (signam == "IOT") { msg[signum] = "IOT instruction" }
if (signam == "KILL") { msg[signum] = "killed" }
- if (signam == "LOST") { msg[signum] = "resource lost" }
+ if (signam == "LOST") { msg[signum] = "resource lost" }
if (signam == "PIPE") { msg[signum] = "broken pipe" }
- if (signam == "POLL") { msg[signum] = "pollable event occurred" }
+ if (signam == "POLL") { msg[signum] = "pollable event occurred" }
if (signam == "PROF") { msg[signum] = "profile signal" }
if (signam == "PWR") { msg[signum] = "power fail" }
if (signam == "QUIT") { msg[signum] = "quit" }
@@ -43,7 +44,7 @@
if (signam == "SYS") { msg[signum] = "invalid system call" }
if (signam == "TERM") { msg[signum] = "terminated" }
if (signam == "TRAP") { msg[signum] = "trace trap" }
- if (signam == "URG") { msg[signum] = "urgent condition" }
+ if (signam == "URG") { msg[signum] = "urgent condition" }
if (signam == "USR1") { msg[signum] = "user-defined signal 1" }
if (signam == "USR2") { msg[signum] = "user-defined signal 2" }
if (signam == "VTALRM") { msg[signum] = "virtual time alarm" }
--
2.38.1
prev parent reply other threads:[~2023-03-26 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 20:40 SIGABRT/SIGIOT confusion under Linux Nate Eldredge
2023-03-26 8:28 ` Mikael Magnusson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230326082853.10215-1-mikachu@gmail.com \
--to=mikachu@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).