1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-28 11:57:28 +00:00

Re-work r260800 to include other signals which start with 'I'

such as ILL, INFO etc..

Submitted by:	delphij
MFC after:	2 weeks
This commit is contained in:
Christian S.J. Peron 2014-01-17 04:16:39 +00:00
parent dedf0f34ad
commit 6f17dec9a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260801

View File

@ -90,6 +90,7 @@ nosig(char *name)
int
main(int ac, char **av)
{
char **saved_av;
struct kinfo_proc *procs, *newprocs;
struct stat sb;
struct passwd *pw;
@ -210,16 +211,8 @@ main(int ac, char **av)
case 'z':
zflag++;
break;
case 'I':
/*
* NB: do not confuse -INT with -I
*/
if (strncmp(*av, "INT", 3) != 0) {
Iflag = 1;
break;
}
/* FALLTHROUGH */
default:
saved_av = av;
if (isalpha((unsigned char)**av)) {
if (strncasecmp(*av, "SIG", 3) == 0)
*av += 3;
@ -229,8 +222,14 @@ main(int ac, char **av)
sig = p - sys_signame;
break;
}
if (!sig)
nosig(*av);
if (!sig) {
if (**saved_av == 'I') {
av = saved_av;
Iflag = 1;
break;
} else
nosig(*av);
}
} else if (isdigit((unsigned char)**av)) {
sig = strtol(*av, &ep, 10);
if (!*av || *ep)