diff options
author | peter <peter@FreeBSD.org> | 2001-02-14 21:56:03 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-02-14 21:56:03 +0000 |
commit | 121aa227560f7b22036fea2a083325bfc9156db2 (patch) | |
tree | 59392c89e86c511417e9f10924c80a8aa68ef954 /usr.bin/killall | |
parent | abdca07e35fabd54bb93be61e66d6eb8785d3528 (diff) | |
download | FreeBSD-src-121aa227560f7b22036fea2a083325bfc9156db2.zip FreeBSD-src-121aa227560f7b22036fea2a083325bfc9156db2.tar.gz |
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".
Diffstat (limited to 'usr.bin/killall')
-rw-r--r-- | usr.bin/killall/killall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c index 4530c50..ea3d01c 100644 --- a/usr.bin/killall/killall.c +++ b/usr.bin/killall/killall.c @@ -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; } } |