From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 23 21:49:56 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 08A65A87; Wed, 23 Jan 2013 21:49:56 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx1.freebsd.org (Postfix) with ESMTP id EAE7020B; Wed, 23 Jan 2013 21:49:54 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id fq12so6911485lab.33 for ; Wed, 23 Jan 2013 13:49:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=/lP5uzRRBXQPOa5C3Dk4kV1he7/AuOyhXWxXG83S2Yg=; b=bug4+mu0bPCUHR8nYlKGXGnt3ukejEpT7oze6em4sHcKlJPAQnL/cc+laMGEG0nAQQ u22pLoj/k9tJSJpHgcb63QCLKwWa/c/8tYAmwFn0f1c/aRatJYpsPKh57/8Kf3TQQG4M ICovVJjb36qop6gAiIJNsyTv6QQVRykBkdkoc/bxxArP9swdRMRZyKZgY47cs9F5V+pn 3EWuC4BooXJ1HbeZg0/6TbOmsR3ReE46qoAC6mbPOt0uboeu0hGQiRKhlZR7gav66yT0 aQdc6/ZvakQPZ50h6vC7JljwMy+Yzc3sviBoWzHb04qQl8nCn0tHazhN+DHE9Hus+NSp p4MA== X-Received: by 10.152.121.212 with SMTP id lm20mr2715734lab.42.1358977793621; Wed, 23 Jan 2013 13:49:53 -0800 (PST) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPS id er8sm8886435lbb.9.2013.01.23.13.49.51 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 23 Jan 2013 13:49:52 -0800 (PST) Sender: Mikolaj Golub Date: Wed, 23 Jan 2013 23:49:50 +0200 From: Mikolaj Golub To: John Baldwin Subject: Re: libprocstat(3): retrieve process command line args and environment Message-ID: <20130123214949.GA3120@gmail.com> References: <20130119151253.GB88025@gmail.com> <9679EEE4-BE52-493E-9188-CAECEE5E63D3@freebsd.org> <20130123072459.GA48402@gmail.com> <201301231131.43972.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201301231131.43972.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Stanislav Sedov , freebsd-hackers@freebsd.org, Robert Watson X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2013 21:49:56 -0000 On Wed, Jan 23, 2013 at 11:31:43AM -0500, John Baldwin wrote: > On Wednesday, January 23, 2013 2:25:00 am Mikolaj Golub wrote: > > IMHO, after adding procstat_getargv and procstat_getargv, the usage of > > kvm_getargv() and kvm_getenvv() (at least in the new code) may be > > deprecated. As this is stated in the man page, BUGS section, "these > > routines do not belong in the kvm interface". I suppose they are part > > of libkvm because there was no a better place for them. procstat(1) > > prefers direct sysctl to them (so, again, code duplication, which I am > > going to remove adding procstat_getargv/envv). > > Hmm, are you going to rewrite ps(1) to use libprocstat? Or rather, is that a > goal someday? That is one current consumer of kvm_getargv/envv. That might > be fine if we want to make more tools use libprocstat instead of using libkvm > directly. I didn't have any plans for ps(1) :-) That is why I wrote about "new code". But if you think it is good to do I might look at it one day... -- Mikolaj Golub