Actually print usage if kill -l is invoked with more than 1 arg

This commit is contained in:
sin 2014-11-11 16:09:07 +00:00
parent a81544a810
commit 88f26b222b

3
kill.c
View File

@ -71,7 +71,8 @@ main(int argc, char *argv[])
for (i = 0; i < LEN(sigs); i++) for (i = 0; i < LEN(sigs); i++)
puts(sigs[i].name); puts(sigs[i].name);
exit(0); exit(0);
} } else if (argc > 1)
usage();
errno = 0; errno = 0;
sig = strtol(argv[0], &end, 0); sig = strtol(argv[0], &end, 0);
if (*end == '\0' && errno == 0) { if (*end == '\0' && errno == 0) {