Date: Tue, 4 Sep 2001 01:03:27 +0300 From: Giorgos Keramidas <charon@labs.gr> To: Stephen Montgomery-Smith <stephen@math.missouri.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: killall longprocname Message-ID: <20010904010327.A4436@hades.hell.gr> In-Reply-To: <3B93EF80.37F0670A@math.missouri.edu>; from stephen@math.missouri.edu on Mon, Sep 03, 2001 at 04:00:48PM -0500 References: <3B93EF80.37F0670A@math.missouri.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
From: Stephen Montgomery-Smith <stephen@math.missouri.edu> Subject: killall longprocname Date: Mon, Sep 03, 2001 at 04:00:48PM -0500 > If I create and run a program called abcdefghijklmnopqrstuvwxyz and then > try to kill it using killall, the only command that seems to work is: > killall abcdefghijklmnop > that is, it looks like killall only looks at the first 16 characters. I > don't see anything about this is the man page. Is this the appropriate > behavior? Actually, the source of killall.c uses MAXCOMLEN as the maximum number of characters to compare. From the 5.0-CURRENT sources I read near line 321 the following: 319 regfree(&rgx); 320 } else { 321 if (strncmp(thiscmd, cmd, MAXCOMLEN) != 0) 322 matched = 0; 323 } And <sys/param.h> defines MAXCOMLEN as 19 in: 72 #include <sys/syslimits.h> 73 74 #define MAXCOMLEN 19 /* max command name remembered */ 75 #define MAXINTERP 32 /* max interpreter file name length */ 76 #define MAXLOGNAME 17 /* max login name length (incl. NUL) */ This is not documented in the manpage though. Perhaps, a send-pr(1) with a correction is proper(?). If you, Stephen, have no time to file a bug report with the fix for the manpage, I can do it tomorrow. -giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010904010327.A4436>