Work around the p_comm[] size limit. If the user supplies more than

16 characters, only check the first 16 since that is all the kernel
records.  This isn't ideal, but it is probably the best we can do.
Otherwise, "killall communicator-linux-4.76.bin" will not match
the process as the kernel only records "communicator-lin".
This commit is contained in:
Peter Wemm 2001-02-14 21:56:03 +00:00
parent 813ff33601
commit 69179c1439
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72497

View File

@ -314,7 +314,7 @@ main(int ac, char **av)
matched = 0;
regfree(&rgx);
} else {
if (strcmp(thiscmd, cmd) != 0)
if (strncmp(thiscmd, cmd, MAXCOMLEN) != 0)
matched = 0;
}
}