From owner-freebsd-current@FreeBSD.ORG Thu Nov 8 14:26:51 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 608F1118 for ; Thu, 8 Nov 2012 14:26:51 +0000 (UTC) (envelope-from break19@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1A28FC12 for ; Thu, 8 Nov 2012 14:26:50 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so5525426iea.13 for ; Thu, 08 Nov 2012 06:26:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=+oYFdpuO4+i7y8XGQCjUg5V2qoT+7cYGxx17lj6EeLo=; b=sQd4Bny08iTVmPu0texCE5DPKXMOnK2A4vsXx4Im8AtTd2hDA+QPyfadbiJIwrdSNx D+n+C/NMS6GTgka3MN+Dc7jnr3RiTQkNKU3qxhH8jrI1VqeeKRE6JZdfrRby06xhCpl4 LzirMRADsb1UuIVezaZP8YFLEQD3ZJcBRrBfgViPjENzhQjl3BRcGR9QBg8qspyQDBNi YhgqA2GroVE+3HtHwhxOKccGiGQQ+78OWTAR0wo7dExyx437ugoawcfR34wtarnQRNka ptLsMtYYxBfokA/3CI6Tw+MktxIIkAPS6BceU0VHqQPZFtVLtOhQUj0C6T5y5g0FYPvb 3IXw== Received: by 10.50.104.230 with SMTP id gh6mr8341424igb.13.1352384810637; Thu, 08 Nov 2012 06:26:50 -0800 (PST) Received: from [192.168.0.198] ([173.157.19.213]) by mx.google.com with ESMTPS id dq9sm4797779igc.5.2012.11.08.06.26.48 (version=SSLv3 cipher=OTHER); Thu, 08 Nov 2012 06:26:50 -0800 (PST) Message-ID: <509BC125.1040207@gmail.com> Date: Thu, 08 Nov 2012 08:26:45 -0600 From: Chuck Burns User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: sysutils/lsof Author Question (for CLANG).... References: <5d4c4abe37bd6fffd0c206c1b7b68ce1@webmail.lerctr.org> <20121107213917.GD77848@eureka.lemis.com> <20121107230034.GF77848@eureka.lemis.com> <509BBEDC.4070103@FreeBSD.org> In-Reply-To: <509BBEDC.4070103@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 08 Nov 2012 14:26:51 -0000 On 11/8/2012 8:17 AM, Andriy Gapon wrote: > on 08/11/2012 01:00 Greg 'groggy' Lehey said the following: >> On Wednesday, 7 November 2012 at 16:35:22 -0600, Larry Rosenman wrote: >>> On 2012-11-07 15:39, Greg 'groggy' Lehey wrote: >>>> On Wednesday, 7 November 2012 at 10:32:23 -0500, Benjamin Kaduk >>>> wrote: >>>>> >>>>> Once again, attempting to use kernel internals outside of the >>>>> supported interfaces is just asking for trouble; I do not understand >>>>> why this message is not sinking in over the course of your previous >>>>> mails to these lists, so I will not try to belabor it further. >>>> >>>> IIRC lsof is a special case that always needs to be built with >>>> intimate knowledge of the kernel. >>> >>> This is VERY true. Since some of the information lsof uses has >>> no API/ABI/KPI/KBI to get, it grovels around in the kernel. >> >> And until those interfaces are provided, I think this is legitimate. >> If there's anybody out there who hasn't used lsof, you should try it. >> It's good. > > Just curious why lsof can't use interfaces that e.g. fstat/sockstat/etc use? > Those base utilities do not seem to experience as much trouble as lsof. > > BTW, it is still beyond me why VOP_WRITE could be of any interest to userland code > even for such a utility as lsof. > Honestly, if you do not like the way lsof does things, I'm sure patches are welcome.. -- Chuck Burns