Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Oct 2011 21:21:48 +0200
From:      =?ISO-8859-1?Q?Ren=E9_Ladan?= <rene@freebsd.org>
To:        Garrett Cooper <yanegomi@gmail.com>
Cc:        Matt Thyer <matt.thyer@gmail.com>, FreeBSD current <freebsd-current@freebsd.org>, Larry Rosenman <ler@lerctr.org>
Subject:   Re: System headers with clang?
Message-ID:  <CADL2u4i1jPMGR0deh8TVqudoBQ4scqFoYazepR5s4DKchyQU2A@mail.gmail.com>
In-Reply-To: <CAGH67wTpZ-HW7ogTWzhxV9XROkxLD_vCMGemc%2B9sOp%2B%2B1H3-gg@mail.gmail.com>
References:  <alpine.BSF.2.00.1110091229550.43656@lrosenman.dyndns.org> <4E942FF1.9000805@FreeBSD.org> <alpine.BSF.2.00.1110110830200.21480@lrosenman.dyndns.org> <4E9449F2.2000801@FreeBSD.org> <4E944BA5.4080506@lerctr.org> <83FC19FA-BD52-4383-9ABE-708161597B85@mac.com> <589d032a-7b71-4ff1-8adf-f5e49e87696c@email.android.com> <CACM2%2B-5ne78pQ0xbbomsJvbw27KsiVN4D66ie-admpQhBg7LPA@mail.gmail.com> <alpine.BSF.2.00.1110111253440.62331@lrosenman.dyndns.org> <CAGH67wTpZ-HW7ogTWzhxV9XROkxLD_vCMGemc%2B9sOp%2B%2B1H3-gg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/10/11 Garrett Cooper <yanegomi@gmail.com>:
> On Tue, Oct 11, 2011 at 10:55 AM, Larry Rosenman <ler@lerctr.org> wrote:
>> On Wed, 12 Oct 2011, Matt Thyer wrote:
>>
>>> On Oct 12, 2011 3:25 AM, "Larry Rosenman" <ler@lerctr.org> 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 <cswiger@mac.com> 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" wit=
h
>>> 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?
>
Just a quick note that FreeBSD 9 and later also have libprocstat which
could be a nice interface.  I haven't looked at the details yet though.

Ren=E9



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADL2u4i1jPMGR0deh8TVqudoBQ4scqFoYazepR5s4DKchyQU2A>