From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 13 12:29:26 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 A499D16A4CE for ; Mon, 13 Sep 2004 12:29:26 +0000 (GMT) Received: from bloodwood.hunterlink.net.au (smtp-local.hunterlink.net.au [203.12.144.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEC5D43D5C for ; Mon, 13 Sep 2004 12:29:24 +0000 (GMT) (envelope-from boris@brooknet.com.au) Received: from [61.8.46.197] (ppp2EC5.dyn.pacific.net.au [61.8.46.197]) i8DCSaRw006013; Mon, 13 Sep 2004 22:28:36 +1000 From: Sam Lawrance To: Joanna Sledzik In-Reply-To: References: Content-Type: text/plain Message-Id: <1095078631.77709.53.camel@dirk.no.domain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 13 Sep 2004 22:30:31 +1000 Content-Transfer-Encoding: 7bit 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:29:26 -0000 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. -Sam