9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] several things
Date: Mon, 13 Oct 2008 18:35:33 -0400	[thread overview]
Message-ID: <26c1814ccfc8559a96987385a144c4e7@quanstro.net> (raw)
In-Reply-To: <a560a5d00810131435k6bdc8ea6m2c0534f5d6c14a8d@mail.gmail.com>

> 1) Having a window with rc and pressing CTRL+d usually closes the window.
> However, from time to time it does not. Instead, I can see EOT (one
> character; diagonally) written after the prompt, the window stays, I can
> write anything into the window, but my commands are not executed. When does
> this happen?

this generally happens when you have mounted a fileserver which doesn't
close all of rio's fds (inherited from the rc you terminated).  rio considers
the window active until all the fds are closed.

> 2) Reading pwd.c I can see 'char pathname[512]' at the beginning of the main
> function. Does it mean plan9 paths are thus limited?

no.  fileservers evaludate the path one element at a time.


> 3) Why do I have to press END key several times to get to the bottom of a
> window (usu when there is a lot of output text from the issued command)?
> (The rio maunual says just one press.)

if you notice that once you are at the end, you can press
<home> then <end> and you will be at the end.  so what's
happening when you press <end> when there's pending output
is that you're placed at the end of the buffer but since the command
producing the output blocked on its output, it immediately started
outputting more data.  so <end> always puts you at the the
*current* end of the buffer.  that doesn't mean that there won't
be data immediately available.

> 4) What is the sense of
> bind 'sth' 'the_same_sth'
> ? (like 'bind / /' or 'bind /usr/ruda/a /usr/ruda/a')

i believe this is a noop.  in the case of "bind / /", look
at /lib/namespace.  consider the case where $rootdir
isn't nil.

> 5) When I do
>
> cd
> mkdir a
> mntgen a
> bind lib a/b
> unmount a
>
> all these command finish ok, but I am left with
>
> bind /usr/ruda/lib /usr/ruda/a/b
>
> in the namespace (see the result of the 'ns' command; there you can also
> spot that after issueing the 'mntgen' command a line
> 'bind /usr/ruda/a /usr/ruda/a/' appears; that relates to my 4th question;
> this bind is the one removed by the 'unmount' command).
> How can I get rid of that then?

i don't think any pruning of inaccessable bits of
the namespace is ever done.  consider a program
like ftpd which via /lib/namespace.ftp (sic) typically
binds something like /usr/ftp/ onto /.  while everything
above /usr/ftp is unaccessable, it's not removed from
the namespace and you can't touch it.

	; mntgen a
	; bind /env a/env
	; bind /bin a/bin
	; bind /proc a/proc
	; bind a /
	; ns

consider it a security feature.

- erik




  reply	other threads:[~2008-10-13 22:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-13 21:35 Rudolf Sykora
2008-10-13 22:35 ` erik quanstrom [this message]
2008-10-14  8:10   ` Rudolf Sykora
2008-10-14  9:30     ` Steve Simon
2008-10-14 12:22     ` Yaroslav
2008-10-14 13:15       ` Charles Forsyth
2008-10-14 21:44         ` Derek Fawcus
2008-10-14 22:28           ` Charles Forsyth
2008-10-15  9:42   ` Roman V. Shaposhnik
2008-10-15 12:17     ` erik quanstrom
2008-10-18  7:26       ` Roman V. Shaposhnik
2008-10-20 14:09         ` Yaroslav
2008-10-20 17:21           ` Roman V. Shaposhnik
2008-10-13 22:51 ` Pietro Gagliardi
2008-10-14  3:07 erik quanstrom
2008-10-14 13:03 erik quanstrom
2008-10-14 14:07 ` Kernel Panic

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=26c1814ccfc8559a96987385a144c4e7@quanstro.net \
    --to=quanstro@quanstro.net \
    --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).