On Sun, Jan 04, 2009 at 10:20:55PM -0800, Russ Cox wrote:
> There are some devices in Plan 9 that simply don't "virtualize",
> because at a deep level they are tied to process state that
> doesn't go through the file system.  Dup manipulates the file
> descriptor table, not files themselves.  Pipe accesses files that
> have no name in the file system.   The pid returned by getpid
> needs to match the pid returned by the parent's fork; it really
> needs to be the process's actual pid.  For example, suppose
> a process wants to know .  If getpid read from /dev/pid
> instead of #c/pid, then running "iostats rc -c 'echo $pid'"
> would show iostats's pid, not rc's.  What then if rc wants to send
> itself (or, more likely, its note group) a note, or fiddle with
> one of its /proc files?  It would be manipulating iostats, not
> itself.
>
>[snip #s #a and #D]

This just means that these services need to be mounted at the canonical
place in the namepsace atop the root provided by iostats.  That yields
equivalent behavior -- the kernel sees the right process making the call and
iostats sees nothing at all -- but it is, I agree, unsatisfactory.

--nwf;

Attachment: pgpuRwRUyOHUv.pgp
Description: PGP signature

Reply via email to