diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-02-28 14:29:09 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-02-28 14:29:09 +0000 |
commit | af1c6ecdc7a764b0b21b32efdd979a6a0cf77d93 (patch) | |
tree | 46c8d880592becbfefe1c13e1f3b2069278fd399 /Src/jobs.c | |
parent | ae6c23ae2c516ac7f65286ee48aedf15e0a4b176 (diff) | |
download | zsh-af1c6ecdc7a764b0b21b32efdd979a6a0cf77d93.tar.gz zsh-af1c6ecdc7a764b0b21b32efdd979a6a0cf77d93.tar.xz zsh-af1c6ecdc7a764b0b21b32efdd979a6a0cf77d93.zip |
20888: allow signal names to have the SIG prefix included
Diffstat (limited to 'Src/jobs.c')
-rw-r--r-- | Src/jobs.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Src/jobs.c b/Src/jobs.c index 429485b9e..5c1574acf 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -1874,6 +1874,8 @@ bin_kill(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func)) while (*++argv) { sig = zstrtol(*argv, &signame, 10); if (signame == *argv) { + if (!strncmp(signame, "SIG", 3)) + signame += 3; for (sig = 1; sig <= SIGCOUNT; sig++) if (!cstrpcmp(sigs + sig, &signame)) break; @@ -1942,7 +1944,8 @@ bin_kill(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func)) } else signame = *argv; makeuppercase(&signame); - if (!strncmp(signame, "SIG", 3)) signame+=3; + if (!strncmp(signame, "SIG", 3)) + signame+=3; /* check for signal matching specified name */ for (sig = 1; sig <= SIGCOUNT; sig++) @@ -2032,6 +2035,9 @@ getsignum(char *s) return x; /* search for signal by name */ + if (!strncmp(s, "SIG", 3)) + s += 3; + for (i = 0; i < VSIGCOUNT; i++) if (!strcmp(s, sigs[i])) return i; |