kvm_openfiles(3) manual page and procfs

Vivenzio Pagliari vivenzio at web.de
Wed Jul 9 11:40:38 UTC 2003


Hello!

I'm quite new to FreeBSD. Coming from Linux, now and then I look
at the differences between the systems and so I was curious, how
information about processes is queried (eg. by the ps program).

First I read somewhere (unfortunately I cannot remember where), that
procfs is deprecated for getting information from and should not be used
because it is not secure. My question here is: Is this statement correct and
if yes, why isn't procfs secure? (This question is somewhat off-topic for
freebsd-doc, but maybe someone can tell me ?!)

Looking at some documentation and the sources of the ps program,
I've realized that the kvm_* familiy of functions serves this purpose in
FreeBSD.

In the ps source, I've noticed, that "/dev/null" is used for the first two
parameters of kvm_openfiles (the execfile and corefile arguments).
But this is not documented in the man page, which rather suggests to
use NULL or a kernel image as execfile and /dev/mem or dev/kmem
or NULL for corefile. Shoudn't the usage of "/dev/null" be documented
as well?

Vivenzio
____________________________________________________________________________
Nur bei WEB.DE Testsieger FreeMail testen und damit 1 qm Regenwald
schuetzen. Jetzt anmelden und mithelfen! http://user.web.de/Regenwald



More information about the freebsd-doc mailing list