An idea probably discarded many times

Lawrence V. Cipriani lvc at cbnews.ATT.COM
Sun Oct 15 08:33:01 AEST 1989


In article <3481 at zorba.Tynan.COM> r_gonzalez at 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 at cbsck.att.com



More information about the Comp.unix mailing list