Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!apple!zorba!dtynan From: lvc@cbnews.ATT.COM (Lawrence V. Cipriani) Newsgroups: comp.unix Subject: Re: An idea probably discarded many times Message-ID: <3493@zorba.Tynan.COM> Date: 14 Oct 89 22:33:01 GMT References: <3481@zorba.Tynan.COM> Sender: dtynan@zorba.Tynan.COM Reply-To: lvc@cbnews.ATT.COM (Lawrence V. Cipriani) Organization: Ideology Busters Inc. Lines: 34 Approved: dtynan@zorba.Tynan.COM In article <3481@zorba.Tynan.COM> r_gonzalez@unhh.bitnet (Roger Gonzalez ) writes: >Since one of Unix's claims to fame is the fact that "everything is a file", >why aren't processes treated the same way? I think it would be a nice >addition to Unix to have a virtual '/proc' directory mounted in the file >system... This is in SVR4. On this machine (running a preliminary version of the code on SVR3) the file system is called /proc. File names in /proc are process numbers. $ ls -l /proc total 25746 -rw------- 1 root root 6144 Oct 9 09:05 00000 -rw------- 1 root root 61440 Oct 9 09:05 00001 -rw------- 1 root root 0 Oct 9 09:05 00002 -rw------- 1 root root 0 Oct 9 09:05 00003 -rw------- 1 root root 83968 Oct 9 09:05 00144 ---------- 1 root root 18432 Oct 9 09:05 00164 -rw------- 1 lvc user 131072 Oct 9 09:05 13531 ... >And instead of the typical message passing scheme(s), pipes, and what-not, >all processes have "buffer areas" which they can use or choose to ignore, >and you can open a process just as if it were a file. All the typical message passing schemes are still in SVR4. /proc files can be opened and ioctl's applied to them for process control/debugging purposes. The pi debugger by Tom Cargill does exactly this. Another benefit of putting process images in the file system is that /proc is "just another file system" and can be mounted on a remote system with RFS so you can debug programs on remote machines. Neat eh? -- Larry Cipriani, att!cbsck!larry or larry@cbsck.att.com