Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 23:17:05 +1000
From:      Sam Lawrance <boris@brooknet.com.au>
To:        Peter Pentchev <roam@ringlet.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: struct proc - basic question
Message-ID:  <1095081425.77709.62.camel@dirk.no.domain>
In-Reply-To: <20040913125107.GB839@straylight.m.ringlet.net>
References:  <Pine.OSF.4.58.0409131355160.185678@sulu.ae.katowice.pl> <1095078631.77709.53.camel@dirk.no.domain> <20040913125107.GB839@straylight.m.ringlet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2004-09-13 at 22:51, Peter Pentchev wrote:
> 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.
> 

Is there a functional difference? kvm_getprocs uses the kern.proc
sysctls anyway.

I did note the comment in the manpage that "these routines do not belong
in the kvm interface".

-Sam



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