From owner-freebsd-fs@FreeBSD.ORG Wed Feb 23 12:45:43 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9EB6106566B for ; Wed, 23 Feb 2011 12:45:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 977458FC0C for ; Wed, 23 Feb 2011 12:45:43 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3DF7546B0D; Wed, 23 Feb 2011 07:45:43 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 28EF38A01D; Wed, 23 Feb 2011 07:45:42 -0500 (EST) From: John Baldwin To: Bob Friesenhahn Date: Wed, 23 Feb 2011 07:37:36 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <201102211707.p1LH7c8n075660@lurza.secnetix.de> <201102220931.17733.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102230737.36748.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 23 Feb 2011 07:45:42 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.5 required=4.2 tests=BAYES_00,MAY_BE_FORGED, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: freebsd-fs@freebsd.org, Kelly Dean Subject: Re: Why is procfs deprecated in favor of procstat? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2011 12:45:43 -0000 On Tuesday, February 22, 2011 2:10:57 pm Bob Friesenhahn wrote: > On Tue, 22 Feb 2011, John Baldwin wrote: > > > > Actually, the replacement for procfs is not sysctl, but ptrace(2), and there > > I have been following this discussion with my jaw agape. It seems > that the many men standing around this elephant are all perceiving > completely different things based on their own interests and > experiences. > > My own software is using procfs to efficiently determine the path to > the currently running executable. I am sure that other software does > the same since Linux procfs (and probably OS X) supports the same > mechanism. It is difficult to imagine how this would be done via > ptrace(2). It would not be the first syscall to return a path to userland (see __getcwd()). Presumably the reason a ptrace(2) OP has not been added for that is that it is that nothing that was ported from procfs to ptrace(2) has needed it. -- John Baldwin