sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 04162bd7b044c4c88ad92add61599bafc0d1ece4
parent 914ad7b73357ff9e692d15e6c6b3a87aeecdccd7
Author: Connor Lane Smith <cls@lubutu.com>
Date:   Tue, 21 Jun 2011 04:56:16 +0100

kill: accept $? values
Diffstat:
Mkill.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/kill.c b/kill.c @@ -5,6 +5,7 @@ #include <stdlib.h> #include <strings.h> #include <unistd.h> +#include <sys/wait.h> #include "util.h" #define LEN(x) (sizeof (x) / sizeof *(x)) @@ -54,6 +55,8 @@ main(int argc, char *argv[]) " %s -l [signum]\n", argv[0], argv[0]); sig = (optind == argc) ? 0 : estrtol(argv[optind], 0); + if(sig > 128) + sig = WTERMSIG(sig); for(i = 0; i < LEN(sigs); i++) if(sigs[i].sig == sig || sig == 0) putword(sigs[i].name);