9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] several things
@ 2008-10-13 21:35 Rudolf Sykora
  2008-10-13 22:35 ` erik quanstrom
  2008-10-13 22:51 ` Pietro Gagliardi
  0 siblings, 2 replies; 17+ messages in thread
From: Rudolf Sykora @ 2008-10-13 21:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

Hello

few questions:

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?

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?

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.)

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

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?

Thanks
Ruda

[-- Attachment #2: Type: text/html, Size: 1400 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-13 21:35 [9fans] several things Rudolf Sykora
@ 2008-10-13 22:35 ` erik quanstrom
  2008-10-14  8:10   ` Rudolf Sykora
  2008-10-15  9:42   ` Roman V. Shaposhnik
  2008-10-13 22:51 ` Pietro Gagliardi
  1 sibling, 2 replies; 17+ messages in thread
From: erik quanstrom @ 2008-10-13 22:35 UTC (permalink / raw)
  To: 9fans

> 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




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-13 21:35 [9fans] several things Rudolf Sykora
  2008-10-13 22:35 ` erik quanstrom
@ 2008-10-13 22:51 ` Pietro Gagliardi
  1 sibling, 0 replies; 17+ messages in thread
From: Pietro Gagliardi @ 2008-10-13 22:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Oct 13, 2008, at 5:35 PM, Rudolf Sykora wrote:

> Hello
>
> few questions:
>
> 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?

When you're running a server, such as ext2srv or dossrv. If I recall
correctly, this was discussed before.

> 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. How many characters can be stored in an absolute pathname is
program-dependent.

> 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.)

rio windows don't scroll by default. To enable scrolling for a certain
window, middle-click and hit scroll, or type

	echo scroll >/dev/wctl

To make scrolling the default, edit $home/lib/profile and change every
instance of

	exec rio

to

	exec rio -s

Log out and log back in.

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

Think of it as making an alias or link.

> 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?

Delete the namespace by closing the window.

You just found a bug; congratulations.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkjz0Q8ACgkQuv7AVNQDs+yPUgCePQ1xijeQfxMC8iWZPuzNGCxH
gCMAnR636iteBBjHhYLW4rdKjfIVIkj8
=aCUq
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-13 22:35 ` erik quanstrom
@ 2008-10-14  8:10   ` Rudolf Sykora
  2008-10-14  9:30     ` Steve Simon
  2008-10-14 12:22     ` Yaroslav
  2008-10-15  9:42   ` Roman V. Shaposhnik
  1 sibling, 2 replies; 17+ messages in thread
From: Rudolf Sykora @ 2008-10-14  8:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

> > 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.
>  - erik
>

But at least it means that the 'pwd' function returns a wrong answer
_without_warning_ when the path is longer. I tried it. This is not a nice
thing. Are these limitations listed in some document?
Ruda

ps.: thanks otherwise for your other answers.

[-- Attachment #2: Type: text/html, Size: 780 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-14  8:10   ` Rudolf Sykora
@ 2008-10-14  9:30     ` Steve Simon
  2008-10-14 12:22     ` Yaroslav
  1 sibling, 0 replies; 17+ messages in thread
From: Steve Simon @ 2008-10-14  9:30 UTC (permalink / raw)
  To: 9fans

> Are these limitations listed in some document?

I don't believe they are.

It might bve nice to think there are no arbitary limits in plan9
as the GNU mantra, however there are not many and personally,
working with remote servers with very long paths, I have never
(knowingly) hit this limit.

Having said this we could probably afford to up the size of pwd's
buffer to, say, 8k to be sixteen times as sure.

-Steve



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  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
  1 sibling, 1 reply; 17+ messages in thread
From: Yaroslav @ 2008-10-14 12:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> But at least it means that the 'pwd' function returns a wrong answer
> _without_warning_ when the path is longer. I tried it. This is not a nice
> thing. Are these limitations listed in some document?

The pwd(1) utility has this limitation for simplicity. The getwd(2)
function and fd2path(2) syscall can work on arbitrary-sized buffers.
So, to overcome the limit, you have few choices:
 1) modify the pwd.c to allocate more memory; or
 2) bind not-so-long parts of your path to /n/something to construct a
namespace with shorter absolute paths; or
 3) blame the tree holders.

--
Best regards,
    Yaroslav.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-14 12:22     ` Yaroslav
@ 2008-10-14 13:15       ` Charles Forsyth
  2008-10-14 21:44         ` Derek Fawcus
  0 siblings, 1 reply; 17+ messages in thread
From: Charles Forsyth @ 2008-10-14 13:15 UTC (permalink / raw)
  To: 9fans

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

fd2path should probably complain if the buffer is too small.
i'm surprised at any actual name longer than 512 (or even 256), not so much for plan 9, but
because linux systems still seem to have that tiny TTY limit on the size of an input line,
or it did the last time i tried to use the mouse to snarf and send a command line printed by make.

[-- Attachment #2: Type: message/rfc822, Size: 2750 bytes --]

From: Yaroslav <yarikos@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net>
Subject: Re: [9fans] several things
Date: Tue, 14 Oct 2008 15:22:10 +0300
Message-ID: <e2f969e10810140522r4e874ef1n9f63d3cced7d53bf@mail.gmail.com>

> But at least it means that the 'pwd' function returns a wrong answer
> _without_warning_ when the path is longer. I tried it. This is not a nice
> thing. Are these limitations listed in some document?

The pwd(1) utility has this limitation for simplicity. The getwd(2)
function and fd2path(2) syscall can work on arbitrary-sized buffers.
So, to overcome the limit, you have few choices:
 1) modify the pwd.c to allocate more memory; or
 2) bind not-so-long parts of your path to /n/something to construct a
namespace with shorter absolute paths; or
 3) blame the tree holders.

--
Best regards,
    Yaroslav.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-14 13:15       ` Charles Forsyth
@ 2008-10-14 21:44         ` Derek Fawcus
  2008-10-14 22:28           ` Charles Forsyth
  0 siblings, 1 reply; 17+ messages in thread
From: Derek Fawcus @ 2008-10-14 21:44 UTC (permalink / raw)
  To: 9fans

On Tue, Oct 14, 2008 at 02:15:15PM +0100, Charles Forsyth wrote:
> i'm surprised at any actual name longer than 512 (or even 256), not so much for plan 9, but
> because linux systems still seem to have that tiny TTY limit on the size of an input line,

err - I seem to recall reading some linux pty/tty source that implied a larger limit in
canonical mode - 4k/8k?  But that assumes the shells in question _use_ cannonical mode.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-14 21:44         ` Derek Fawcus
@ 2008-10-14 22:28           ` Charles Forsyth
  0 siblings, 0 replies; 17+ messages in thread
From: Charles Forsyth @ 2008-10-14 22:28 UTC (permalink / raw)
  To: 9fans

>But that assumes the shells in question _use_ cannonical mode.

most of them use readline, so that might explain it.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-13 22:35 ` erik quanstrom
  2008-10-14  8:10   ` Rudolf Sykora
@ 2008-10-15  9:42   ` Roman V. Shaposhnik
  2008-10-15 12:17     ` erik quanstrom
  1 sibling, 1 reply; 17+ messages in thread
From: Roman V. Shaposhnik @ 2008-10-15  9:42 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, 2008-10-13 at 18:35 -0400, erik quanstrom wrote:
> > 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.

I have always thought, that the only reason for "bind <foo> <foo>"
is so that subsequent "bind -a/-b" would work:
   http://groups.google.com/group/comp.os.plan9/browse_thread/thread/c6cc9fb882978983/5067403b25124bac?hl=en&lnk=gst&q=bind+#5067403b25124bac

I would really love to be educated is there's something more
subtle to it.

> > 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.

Be it as it may, I still can't quite follow why *manual* pruning
of the entries from the namespace would be forbidden. unmount(2)
takes two strings as arguments, right? It doesn't even need an fd.

Thanks,
Roman.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-15  9:42   ` Roman V. Shaposhnik
@ 2008-10-15 12:17     ` erik quanstrom
  2008-10-18  7:26       ` Roman V. Shaposhnik
  0 siblings, 1 reply; 17+ messages in thread
From: erik quanstrom @ 2008-10-15 12:17 UTC (permalink / raw)
  To: rvs, 9fans

> > 	; mntgen a
> > 	; bind /env a/env
> > 	; bind /bin a/bin
> > 	; bind /proc a/proc
> > 	; bind a /
> > 	; ns
> >
> > consider it a security feature.
>
> Be it as it may, I still can't quite follow why *manual* pruning
> of the entries from the namespace would be forbidden. unmount(2)
> takes two strings as arguments, right? It doesn't even need an fd.

because they're not visible.  you have to access
it in order to unmount it.

- erik



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-15 12:17     ` erik quanstrom
@ 2008-10-18  7:26       ` Roman V. Shaposhnik
  2008-10-20 14:09         ` Yaroslav
  0 siblings, 1 reply; 17+ messages in thread
From: Roman V. Shaposhnik @ 2008-10-18  7:26 UTC (permalink / raw)
  To: erik quanstrom; +Cc: 9fans

On Wed, 2008-10-15 at 08:17 -0400, erik quanstrom wrote:
> > > 	; mntgen a
> > > 	; bind /env a/env
> > > 	; bind /bin a/bin
> > > 	; bind /proc a/proc
> > > 	; bind a /
> > > 	; ns
> > >
> > > consider it a security feature.
> >
> > Be it as it may, I still can't quite follow why *manual* pruning
> > of the entries from the namespace would be forbidden. unmount(2)
> > takes two strings as arguments, right? It doesn't even need an fd.
>
> because they're not visible.  you have to access
> it in order to unmount it.

I see what you meant now. For some reason, I constantly assume
that namespace is sort of a substitution table that helps you
walk(5) across the bind/mount points. But it is not. Is there
a simple reason for mandating access to the target of the bind?

Or here's an easier way to ask the same: is there a simple reason
for
   $ bind /foo /really/nested/bar
always triggering walks into /foo and /really/nested/bar and not
allowing for "lazy evaluation"?

Thanks,
Roman.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-18  7:26       ` Roman V. Shaposhnik
@ 2008-10-20 14:09         ` Yaroslav
  2008-10-20 17:21           ` Roman V. Shaposhnik
  0 siblings, 1 reply; 17+ messages in thread
From: Yaroslav @ 2008-10-20 14:09 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2008/10/18 Roman V. Shaposhnik <rvs@sun.com>:
> On Wed, 2008-10-15 at 08:17 -0400, erik quanstrom wrote:
>> > >   ; mntgen a
>> > >   ; bind /env a/env
>> > >   ; bind /bin a/bin
>> > >   ; bind /proc a/proc
>> > >   ; bind a /
>> > >   ; ns
>> > >
>> > > consider it a security feature.
>> >
>> > Be it as it may, I still can't quite follow why *manual* pruning
>> > of the entries from the namespace would be forbidden. unmount(2)
>> > takes two strings as arguments, right? It doesn't even need an fd.
>>
>> because they're not visible.  you have to access
>> it in order to unmount it.
>
> I see what you meant now. For some reason, I constantly assume
> that namespace is sort of a substitution table that helps you
> walk(5) across the bind/mount points. But it is not. Is there
> a simple reason for mandating access to the target of the bind?
>
> Or here's an easier way to ask the same: is there a simple reason
> for
>   $ bind /foo /really/nested/bar
> always triggering walks into /foo and /really/nested/bar and not
> allowing for "lazy evaluation"?

The evaluation of bind argument "happens at the time of the bind, not
when the binding is later used." -- see bind(2).
Also, /sys/doc/9.ps worth reading.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-20 14:09         ` Yaroslav
@ 2008-10-20 17:21           ` Roman V. Shaposhnik
  0 siblings, 0 replies; 17+ messages in thread
From: Roman V. Shaposhnik @ 2008-10-20 17:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, 2008-10-20 at 17:09 +0300, Yaroslav wrote:
> > Or here's an easier way to ask the same: is there a simple reason
> > for
> >   $ bind /foo /really/nested/bar
> > always triggering walks into /foo and /really/nested/bar and not
> > allowing for "lazy evaluation"?
>
> The evaluation of bind argument "happens at the time of the bind, not
> when the binding is later used." -- see bind(2).

That is well understood. But perhaps you've misunderstood my question
(well, either that or I wasn't too articulate asking it). The question
was really about *why* such a behavior was chosen to begin with? On the
surface it seems that namespace-as-a-substitution table is not such
a bad idea AND it adds flexibility. After all, it is trivial to emulate
eager evaluation if you have lazy one implemented, but not the other
way around.

Of course, "you don't argue with Ken" (c) ;-) Which means that
there's a pretty good reason for bind evaluation to be eager, its just
that it doesn't seem obvious to me. Hence the question.

Thanks,
Roman.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
  2008-10-14 13:03 erik quanstrom
@ 2008-10-14 14:07 ` Kernel Panic
  0 siblings, 0 replies; 17+ messages in thread
From: Kernel Panic @ 2008-10-14 14:07 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

erik quanstrom wrote:
>>> Are these limitations listed in some document?
>>>
>> I don't believe they are.
>>
>> It might bve nice to think there are no arbitary limits in plan9
>> as the GNU mantra, however there are not many and personally,
>> working with remote servers with very long paths, I have never
>> (knowingly) hit this limit.
>>
>> Having said this we could probably afford to up the size of pwd's
>> buffer to, say, 8k to be sixteen times as sure.
>>
>
> if you're going to all that trouble, why not make sure?
> (i don't think this is worth it, personally, but if you do ...)
>
> #include <u.h>
> #include <libc.h>
>
> void
> main(void)
> {
> 	char *p;
> 	int n, s;
>
> 	for(s = 128; ; s <<= 1){
> 		p = malloc(s);
> 		if(p == nil)
> 			sysfatal("malloc");
> 		p[s-1] = 1;
> 		if((getwd(p, s)) == 0)
> 			sysfatal("pwd: %r");
> 		if(p[s-1] == 1)
> 			break;
> 	}
> 	print("%s\n", p);
> 	exits(0);
> }
>
> - erik
>
>
AAArgg!!!1111 We leak for a fraction of micro seconds! we should
do realloc() here of course and free() the memory before exits()
just to make it even more complex ;-)

cinap




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
@ 2008-10-14 13:03 erik quanstrom
  2008-10-14 14:07 ` Kernel Panic
  0 siblings, 1 reply; 17+ messages in thread
From: erik quanstrom @ 2008-10-14 13:03 UTC (permalink / raw)
  To: steve, 9fans

> > Are these limitations listed in some document?
>
> I don't believe they are.
>
> It might bve nice to think there are no arbitary limits in plan9
> as the GNU mantra, however there are not many and personally,
> working with remote servers with very long paths, I have never
> (knowingly) hit this limit.
>
> Having said this we could probably afford to up the size of pwd's
> buffer to, say, 8k to be sixteen times as sure.

if you're going to all that trouble, why not make sure?
(i don't think this is worth it, personally, but if you do ...)

#include <u.h>
#include <libc.h>

void
main(void)
{
	char *p;
	int n, s;

	for(s = 128; ; s <<= 1){
		p = malloc(s);
		if(p == nil)
			sysfatal("malloc");
		p[s-1] = 1;
		if((getwd(p, s)) == 0)
			sysfatal("pwd: %r");
		if(p[s-1] == 1)
			break;
	}
	print("%s\n", p);
	exits(0);
}

- erik



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [9fans] several things
@ 2008-10-14  3:07 erik quanstrom
  0 siblings, 0 replies; 17+ messages in thread
From: erik quanstrom @ 2008-10-14  3:07 UTC (permalink / raw)
  To: pietro10, 9fans

 * This comment might belong somewhere else.

> > 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?
>
> Delete the namespace by closing the window.

i believe the answer to the original question is, you can't.

closing a window can delete a namespace, but there's more to the
story.  namespaces aren't tied to rio windows.  they're tied to processes.
(see rfork(2).)

namespaces are garbage collected.  when the last process / chan with a
reference to a namespace exits, the namespace is reclaimed.

deleting a rio window *can* be a special case of this.  (cf. the non-closing
rio window discussion.)

> You just found a bug; congratulations.

this is not a bug.  inaccessable bits are not pruned from
the namespace.  maybe that is  counter to your
expectations, but that doesn't make it a bug.

it would be a serious security problem if you could unbind
inaccessable bits from your namespace.  this would imply
you could access them.

- erik



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-10-20 17:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-13 21:35 [9fans] several things Rudolf Sykora
2008-10-13 22:35 ` erik quanstrom
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

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).