From owner-freebsd-questions Mon Aug 11 23:11:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA02820 for questions-outgoing; Mon, 11 Aug 1997 23:11:09 -0700 (PDT) Received: from obie.softweyr.ml.org ([199.104.124.49]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA02815 for ; Mon, 11 Aug 1997 23:11:06 -0700 (PDT) Received: (from wes@localhost) by obie.softweyr.ml.org (8.7.5/8.6.12) id AAA22312; Tue, 12 Aug 1997 00:14:00 -0600 (MDT) Date: Tue, 12 Aug 1997 00:14:00 -0600 (MDT) Message-Id: <199708120614.AAA22312@obie.softweyr.ml.org> From: Wes Peters To: spork CC: questions@freebsd.org Subject: Re: What is procfs? (was Re: procfs hole) In-Reply-To: References: Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk spork@super-g.com writes: > On Sun, 10 Aug 1997, Brian Mitchell wrote: > > > any setuid program. As noted, the easiest way to avoid the problem is just > > to disable procfs -- nobody really uses it anyways. > > Would anyone be willing to give a short explanation of the /proc > filesystem and what the original conception of it accomplished? It is a simple way to interface with running processes on your system. The proc filesystem creates psuedo-files that allow the process owner to read and write the process memory map, the registers for that process context, and various bits of information about the process. The advantage is that it makes writing programs like ps(1) and debuggers much more straightforward. If you want to debug process 43, you open /proc/43/ctl to control the process and /proc/43/mem to read its memory map. /proc/43/regs and /proc/43/fpregs allow you to read and modify the registers and floating-point registers, etc. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC http://www.xmission.com/~softweyr softweyr@xmission.com