9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* 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
* 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
* [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

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-14  3:07 [9fans] several things erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2008-10-14 13:03 erik quanstrom
2008-10-14 14:07 ` Kernel Panic
2008-10-13 21:35 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

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