diff options
author | Oliver Kiddle <opk@zsh.org> | 2024-02-28 00:21:11 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2024-02-28 00:21:11 +0100 |
commit | 5331ff11c64d9d292f4fe817723af6e0a067fa1f (patch) | |
tree | 367ea996dca3e15adc65bc5c4077726f56b08482 /Src/hashtable.c | |
parent | b68002d927b1577bbed453d7bbbe39b55acf7bd0 (diff) | |
download | zsh-5331ff11c64d9d292f4fe817723af6e0a067fa1f.tar.gz zsh-5331ff11c64d9d292f4fe817723af6e0a067fa1f.zip |
52594: support for POSIX real-time signals with kill and trap
Also add new -L option to kill for a more verbose listing of signals
Diffstat (limited to 'Src/hashtable.c')
-rw-r--r-- | Src/hashtable.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c index bb165505e..75b06c4ad 100644 --- a/Src/hashtable.c +++ b/Src/hashtable.c @@ -836,10 +836,10 @@ static HashNode removeshfuncnode(UNUSED(HashTable ht), const char *nam) { HashNode hn; - int signum; + int sigidx; - if (!strncmp(nam, "TRAP", 4) && (signum = getsignum(nam + 4)) != -1) - hn = removetrap(signum); + if (!strncmp(nam, "TRAP", 4) && (sigidx = getsigidx(nam + 4)) != -1) + hn = removetrap(sigidx); else hn = removehashnode(shfunctab, nam); @@ -856,10 +856,10 @@ disableshfuncnode(HashNode hn, UNUSED(int flags)) { hn->flags |= DISABLED; if (!strncmp(hn->nam, "TRAP", 4)) { - int signum = getsignum(hn->nam + 4); - if (signum != -1) { - sigtrapped[signum] &= ~ZSIG_FUNC; - unsettrap(signum); + int sigidx = getsigidx(hn->nam + 4); + if (sigidx != -1) { + sigtrapped[sigidx] &= ~ZSIG_FUNC; + unsettrap(sigidx); } } } @@ -876,9 +876,9 @@ enableshfuncnode(HashNode hn, UNUSED(int flags)) shf->node.flags &= ~DISABLED; if (!strncmp(shf->node.nam, "TRAP", 4)) { - int signum = getsignum(shf->node.nam + 4); - if (signum != -1) { - settrap(signum, NULL, ZSIG_FUNC); + int sigidx = getsigidx(shf->node.nam + 4); + if (sigidx != -1) { + settrap(sigidx, NULL, ZSIG_FUNC); } } } |