diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-12-21 05:53:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-12-21 05:53:28 +0000 |
commit | cf85f7cf0e08f6b4a2013b40ca5c576efff262c4 (patch) | |
tree | 5e3c7ec92e0071cd238fcea655557f7d14cd0f93 /bin/ksh | |
parent | 660d8a068e8535dcbba8243f76cb4843586c96fe (diff) |
correct built-in kill
Diffstat (limited to 'bin/ksh')
-rw-r--r-- | bin/ksh/trap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ksh/trap.c b/bin/ksh/trap.c index 9b9076caf2b..c2118b541e7 100644 --- a/bin/ksh/trap.c +++ b/bin/ksh/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.7 1998/10/29 04:09:21 millert Exp $ */ +/* $OpenBSD: trap.c,v 1.8 1998/12/21 05:53:27 deraadt Exp $ */ /* * signal handling @@ -98,7 +98,9 @@ gettrap(name) return NULL; } for (p = sigtraps, i = SIGNALS+1; --i >= 0; p++) - if (p->name && strcasecmp(p->name, name) == 0) + if (p->name && (strcasecmp(p->name, name) == 0 || + (strlen(name) > 3 && !strncasecmp("SIG", p->name, 3) && + !strcasecmp(p->name, name + 3)))) return p; return NULL; } |