[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FreeBSD 5.3 setup help

From: Richard Frith-Macdonald
Subject: Re: FreeBSD 5.3 setup help
Date: Wed, 2 Feb 2005 14:11:18 +0000

Forgive me for butting in, but you and David appear to be talking without
connecting ... at least you appear to be ignoring his points.

Your point seems to be basically that use of '/proc' is not portable and that the /proc api is bad. That may be true, but it's not a useful point since we have to work with the features actually available on a system. Certainly most of the ms-windows api is neither portable nor good, but we still have to use it
on a windows system.

Davids point was that he would like to see examples of specific cases where the existing code does not work as it should on some systems, preferably with patches to fix it on those systems (ones which don't break other platforms), so we can improve things. Apart from your 'side note' below, you seem to have
ignored this request.

On 2 Feb 2005, at 13:12, Chris Vetter wrote:
I said, even though there is no /proc on FreeBSD 5.x, you can always
use --disable-proc (or something similar) on 'configure' since BSD
does have libkvm.

The problem with NSProcessInfo is, that if libkvm does NOT exist, and
tries /proc instead, it most likely will fail, because NSProcessInfo
tries to open and read file '/proc/<pid>/cmdline' which may well exist
on Linux, but does not necessarily exist on other systems. Or if it does,
it does not necessarily have the expected information.

Of course code would fail if it tried to use system-specific features on the
wrong system.  David probably considered that too obvious a point to be
worth mentioning. The 'configure' scripts are used to detect what features
are available on a particular system and cause the NSProcessInfo code
to be compiled with the appropriate feature support.

On a side note regarding NSProcessInfo+load:
The arguments passed to kvm_open() differ from what Solaris' kvm_open()
expects and kvm_getprocs() doesn't even exist on Solaris. Contrary to
what the opening comment states about being compatible.

That's interesting information. Do you have code which *does* work on Solaris and a patch to alter the configure script to detect the difference that you can contribute? I suspect that the author of the kvm code developed it on BSD rather than Solaris.

Does this KVM code actually get used on Solaris? I would have thought that, if code containing a non-existent function was used, we would get compile errors on a solaris
machine, and I haven't heard of them.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]