From owner-freebsd-current@FreeBSD.ORG Tue Oct 11 19:19:44 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A94B106566B for ; Tue, 11 Oct 2011 19:19:44 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6C48FC1F for ; Tue, 11 Oct 2011 19:19:44 +0000 (UTC) Received: by qadz30 with SMTP id z30so6706024qad.13 for ; Tue, 11 Oct 2011 12:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sQZDjH6RX9ot9irSmGDpdoYKl+Qsb0Dxc0gF8NsJPtM=; b=l9d5LJzDytbWkDAZW6RTLyksxVBhwEyIQntt/XSMvNVvzblHdyDiOIqJRBde4sutNb UJqcO2JQyGnWWdGaLEUMdvx0SfHsRqR4rXM4VACFEi/a9dZxTHOq15FpkMbd2ibSPPrd xjO2zZmuWFMSNw3OYo2gAYpmn68hA5nIFcbhk= MIME-Version: 1.0 Received: by 10.224.176.143 with SMTP id be15mr7974395qab.33.1318360783345; Tue, 11 Oct 2011 12:19:43 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Tue, 11 Oct 2011 12:19:43 -0700 (PDT) In-Reply-To: References: <4E942FF1.9000805@FreeBSD.org> <4E9449F2.2000801@FreeBSD.org> <4E944BA5.4080506@lerctr.org> <83FC19FA-BD52-4383-9ABE-708161597B85@mac.com> <589d032a-7b71-4ff1-8adf-f5e49e87696c@email.android.com> Date: Tue, 11 Oct 2011 12:19:43 -0700 Message-ID: From: Garrett Cooper To: Larry Rosenman Content-Type: text/plain; charset=ISO-8859-1 Cc: Matt Thyer , FreeBSD current Subject: Re: System headers with clang? 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: Tue, 11 Oct 2011 19:19:44 -0000 On Tue, Oct 11, 2011 at 10:55 AM, Larry Rosenman wrote: > On Wed, 12 Oct 2011, Matt Thyer wrote: > >> On Oct 12, 2011 3:25 AM, "Larry Rosenman" wrote: >>> >>> I didn't say bug for bug, just not generate stupid errors like the ffs >> >> one. >>> >>> -- >>> Sent from my Android phone with K-9 Mail. Please excuse my brevity. >>> >>> Chuck Swiger wrote: >>> >>> On Oct 11, 2011, at 6:59 AM, Larry Rosenman wrote: >>>> >>>> We will NOT support clang as the compiler for lsof unless the system >> >> headers work the same way as gcc's do. >>> >>> That apparently means you won't support clang then, because it's not >> >> intended to be (or ever going to be) fully bug-for-bug "compatible" with >> GCC. In this case, at least, clang is reporting legitimate issues which >> should be fixed, even if folks continue to build lsof with GCC from now >> until the end of days. >> >> The elegant solution would be to avoid this problem altogether by >> re-implementation of lsof using interfaces into the kernel that provide >> the >> required information. >> >> bsdof anyone? >> > lsof is PORTABLE and available on LOTS of platforms. > > We have fstat, but lsof can be used between differing OS's. > > We've also asked for Kernel interfaces before, but no one volunteered > to make the KPI for them. > > I'm sure if someone(tm) (not me, insufficient knowledge) was > to make interfaces for ALL that lsof needs, Vic would implement it > as it would make his life easier. It would be nice in general if there were sysctls for accessing this data as even utilities in base have libkvm magic sprinkled around with pointer magic by default instead of using the sysctl analogs (I'm referring to ifconfig, netstat, etc), and as noted by some.. using libkvm on live memory could be potentially; the only valid usage I can really think of is when dealing with . What data does Vic need to grab from the kernel in order to get the file descriptor data? Thanks! -Garrett