From owner-freebsd-questions Mon Sep 3 17:35:38 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 26C2A37B408 for ; Mon, 3 Sep 2001 17:35:33 -0700 (PDT) Received: from hades.hell.gr (patr530-b067.otenet.gr [195.167.121.195]) by mailsrv.otenet.gr (8.11.5/8.11.5) with ESMTP id f840ZTA13042; Tue, 4 Sep 2001 03:35:29 +0300 (EEST) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id f83M3Sb04464; Tue, 4 Sep 2001 01:03:28 +0300 (EEST) (envelope-from charon@labs.gr) Date: Tue, 4 Sep 2001 01:03:27 +0300 From: Giorgos Keramidas To: Stephen Montgomery-Smith Cc: freebsd-questions@FreeBSD.ORG Subject: Re: killall longprocname Message-ID: <20010904010327.A4436@hades.hell.gr> References: <3B93EF80.37F0670A@math.missouri.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B93EF80.37F0670A@math.missouri.edu>; from stephen@math.missouri.edu on Mon, Sep 03, 2001 at 04:00:48PM -0500 X-PGP-Fingerprint: 3A 75 52 EB F1 58 56 0D - C5 B8 21 B6 1B 5E 4A C2 X-URL: http://students.ceid.upatras.gr/~keramida/index.html Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG From: Stephen Montgomery-Smith 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 defines MAXCOMLEN as 19 in: 72 #include 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