struct proc - basic question

Peter Pentchev roam at ringlet.net
Mon Sep 13 05:50:38 PDT 2004


On Mon, Sep 13, 2004 at 10:30:31PM +1000, Sam Lawrance wrote:
> On Mon, 2004-09-13 at 22:01, Joanna Sledzik wrote:
> > Hi :)
> > I'm very very begginer in Unix system programming.
> > What function should I use to catch the struct proc for some process?
> > Is it possible to get the pointer to struct proc using for example the pid_t pid
> > as an argument?
> 
> >From userland, maybe the kvm_* functions will do what you want.
> See the kvm, kvm_open and kvm_getprocs manpages.

The kern.proc.all sysctl might be a better idea; see my other e-mail for
details.

G'luck,
Peter

-- 
Peter Pentchev	roam at ringlet.net    roam at cnsys.bg    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
I am jealous of the first word in this sentence.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040913/b71379d4/attachment.bin


More information about the freebsd-hackers mailing list