From owner-freebsd-current@FreeBSD.ORG Sat Oct 15 08:33:56 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5E1716A421; Sat, 15 Oct 2005 08:33:56 +0000 (GMT) (envelope-from discussion-lists@linnet.org) Received: from orb.pobox.com (orb.pobox.com [207.8.226.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD4F643D58; Sat, 15 Oct 2005 08:33:55 +0000 (GMT) (envelope-from discussion-lists@linnet.org) Received: from orb (localhost [127.0.0.1]) by orb.pobox.com (Postfix) with ESMTP id 3D8CA1F02; Sat, 15 Oct 2005 04:34:18 -0400 (EDT) Received: from mappit.local.linnet.org (212-74-113-67.static.dsl.as9105.com [212.74.113.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by orb.sasl.smtp.pobox.com (Postfix) with ESMTP id D68F08B; Sat, 15 Oct 2005 04:34:15 -0400 (EDT) Received: from lists by mappit.local.linnet.org with local (Exim 4.54 (FreeBSD)) id 1EQhUC-00063N-BI; Sat, 15 Oct 2005 09:33:48 +0100 Date: Sat, 15 Oct 2005 09:33:48 +0100 From: Brian Candler To: John Baldwin Message-ID: <20051015083348.GA23073@uk.tiscali.com> References: <434BCDF6.3090303@samsco.org> <1129201350.13257.9.camel@myfreebsd.homeunix.org> <20051013155511.GA1748@mail.crypta.net> <200510141502.16653.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200510141502.16653.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: Andy Hilker , freebsd-current@freebsd.org Subject: Re: FreeBSD 6.0-RC1 available X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2005 08:33:57 -0000 On Fri, Oct 14, 2005 at 03:02:15PM -0400, John Baldwin wrote: > > Is it possible to include this minor patch for rc-ng scripts? It > > ist present since 5.3 or earlier... > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/82430 > > Why does the process name have []'s around it? If the total length of the command line (argv strings) is longer than kern.ps_arg_cache_limit, which defaults to 256, then this is what you'll see. `ps` shows just the command name in [] and no arguments. I've noticed this with courier-imap, for example, which has a very long command line. So I've done sysctl kern.ps_arg_cache_limit=512 on my courier-imap boxes to be able to see the full line. Equally, if you want to demonstrate this to yourself for testing purposes, try setting it to something a lot smaller, and then starting some new processes. I also think that a process which is started with an empty argv[] array will be displayed in this way. See the example below, and paragraph 4.4 at http://www.faqs.org/faqs/unix-faq/faq/part4/ I don't know which case applies to clamav-milter, or maybe there's some other reason - perhaps the OP can confirm. In any case, if a script tries to locate a program's pid using 'ps' output, I think this is certainly a case it needs to deal with. Regards, Brian. ---- 8< ---------------- $ cat ert.c #include int main(void) { execl("./ert2", 0); return 127; } $ cat ert2.c #include int main(void) { sleep(20); return 0; } $ gcc -Wall -o ert ert.c $ gcc -Wall -o ert2 ert2.c $ ./ert & $ ps auxwww | grep ert brian 23247 0.0 0.1 1188 468 p2 S 9:30AM 0:00.01 [ert2] $