From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 13 12:50:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 290AB16A4CE for ; Mon, 13 Sep 2004 12:50:38 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 0787E43D41 for ; Mon, 13 Sep 2004 12:50:37 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 32757 invoked from network); 13 Sep 2004 12:48:15 -0000 Received: from unknown (HELO straylight.m.ringlet.net) (217.75.134.254) by gandalf.online.bg with SMTP; 13 Sep 2004 12:48:15 -0000 Received: (qmail 39030 invoked by uid 1000); 13 Sep 2004 12:51:07 -0000 Date: Mon, 13 Sep 2004 15:51:07 +0300 From: Peter Pentchev To: Sam Lawrance Message-ID: <20040913125107.GB839@straylight.m.ringlet.net> Mail-Followup-To: Sam Lawrance , Joanna Sledzik , freebsd-hackers@freebsd.org References: <1095078631.77709.53.camel@dirk.no.domain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DKU6Jbt7q3WqK7+M" Content-Disposition: inline In-Reply-To: <1095078631.77709.53.camel@dirk.no.domain> User-Agent: Mutt/1.5.6i cc: Joanna Sledzik cc: freebsd-hackers@freebsd.org Subject: Re: struct proc - basic question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 12:50:38 -0000 --DKU6Jbt7q3WqK7+M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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? >=20 > >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 --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@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. --DKU6Jbt7q3WqK7+M Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBRZe77Ri2jRYZRVMRAlbSAKCxllbLZFZ62qaF1VLwlpXEMrAzXgCfd0Rn I5KmAXGltV72jXjd6zHEr2k= =gVog -----END PGP SIGNATURE----- --DKU6Jbt7q3WqK7+M--