9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Nathaniel W Filardo <nwf@cs.jhu.edu>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Why do we need syspipe() ?
Date: Tue,  6 Jan 2009 12:40:15 -0500	[thread overview]
Message-ID: <20090106174015.GK8355@masters10.cs.jhu.edu> (raw)
In-Reply-To: <dd6fe68a0901042220y278aa283g87f42d2eb458e617@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

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 #2: Type: application/pgp-signature, Size: 204 bytes --]

  parent reply	other threads:[~2009-01-06 17:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04  5:04 Roman V. Shaposhnik
2009-01-04  6:56 ` Russ Cox
2009-01-05  4:39   ` Roman V. Shaposhnik
2009-01-05  6:20     ` Russ Cox
2009-01-05  7:28       ` lucio
2009-01-05 11:00         ` roger peppe
2009-01-08 23:36           ` Roman V. Shaposhnik
2009-01-06 17:40       ` Nathaniel W Filardo [this message]
2009-01-06 20:37         ` Charles Forsyth
2009-01-06 23:13           ` Roman V. Shaposhnik
2009-01-06 23:15             ` erik quanstrom
2009-01-08 23:45               ` Roman V. Shaposhnik
2009-01-08 23:48                 ` erik quanstrom
2009-01-09  2:05                   ` Roman V. Shaposhnik
2009-01-09 12:54                     ` roger peppe
2009-01-07  3:48             ` lucio
2009-01-07  7:00       ` Roman Shaposhnik
2009-01-07  9:31         ` Charles Forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090106174015.GK8355@masters10.cs.jhu.edu \
    --to=nwf@cs.jhu.edu \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).