Giacomo Tesio | 30 Jan 12:21 2015

wstat and atomic directory change

Hi, I'm wondering about the validity of an interpretation of intro(5) and stat(5) that could allow a server to atomically change the directory of a file.

From intro(5)
The notation string[s] (using a literal s character) is shorthand for s[2] followed by s bytes of UTF-8 text. (Systems may choose to reduce the set of legal characters to reduce syntactic problems, for example to remove slashes from name compo- nents, but the protocol has no such restriction. Plan 9 names may contain any printable character (that is, any character outside hexadecimal 00-1F and 80-9F) except slash.).

 wstat(5) on the other hand does not say much about the name field of Fcall:

The name can be changed by anyone with write permission in the parent directory; it is an error to change the name to that of an existing file.
Now, since the protocol does not restrict names (even if Plan 9 does it), I'm wondering if setting the name to a full path starting from root could be used to change atomically the directory of a file (given the write permission on both original and target directory).

Obviously I'm not referring to Plan 9 file servers (I guess this would be a non retrocompatbile change), but I'm considering if such interpretation would be wrong (according to the official specifications).

A server supporting such behaviour could be considered a 9p2000 conformant server?


Steve Simon | 29 Jan 16:51 2015

endianess and 3rd party libraries

I have some very un-plan9 3rd party libraries which rely on a
#define to do byte swapping for endianess.

Anyone have a neet recipie for mk to d3etect the
current machines endianess?

I know, I feel dirty just asking but what can I do,
there is too much code to rewrite them properly.

off to get my hair shirt...


Rudolf Sykora | 29 Jan 13:24 2015

9atom boot problem


I tried 9atom from 2014-06-27, but it doesn't (now I add 'always'; sometimes
it does get through) boot.

If I choose to install plan9, I get a result shown in the attached
a.png (and it does not proceed any further).

If I choose to just boot (not install), it gets stuck after
init: starting /bin/rc
and shows the same 'spurious interrupt 39'.

Some more info about booting progress is in b.png
and c.png.

Even if the machine boots, I get a lot of 'spurious interrupt 39' messages.
In spite of these messages I am trying to install the system.

It is a intelD865GVHZ motherboard.

Any help?

Giacomo Tesio | 29 Jan 10:04 2015

A few questions about 9p

Hi, I'm coding a small .NET library to connect 9p2000 services and I have a few questions about things that the manual doesn't explain (or I was not able to find).

What's the meaning of qids? I see that responses often include them but request messages do not.

What's the proper message sequence to delete a file? And to delete a non empty directly?

Is it possible to move a file between different directories atomically?

I can't find details on the file execution permission: looks like a malicious client could just ignore it on files and execute anything that it can read (obviously I'm just talking about single files,  not directory).

When I should clunk the afid?

What about encryption? Is it completely delegated to the transport layer?

Thanks for your help!


Kristofer Younger | 28 Jan 16:52 2015

plan9port on Yosemite

So I am getting a bunch of errors when recompiling plan9port on yosemite…

+ Submitting changes:


* Resetting /usr/local/plan9/config
* Compiler version:
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
* Running on Darwin: checking architecture...
x86-64 found.
* Building everything (be patient)...
>>> cd /usr/local/plan9/src/lib9; mk all                  
9c  dirread.c
        return getdirentries(fd, (void*)buf, n, &off);
/usr/include/dirent.h:160:5: note: 'getdirentries' has been explicitly marked deprecated here
int getdirentries(int, char *, int, long *)
1 warning generated.
>>> cd /usr/local/plan9/src/libndb; mk all   
9c  ndbreorder.c
ndbreorder.c:41:55: warning: for loop has empty body [-Wempty-body]
                for(prev = last; prev->line != x; prev = prev->line);
ndbreorder.c:41:55: note: put the semicolon on a separate line to silence this warning
1 warning generated.
>>> cd /usr/local/plan9/src/cmd; mk all       
9c  dd.c
        ibuf = sbrk(ibs);
/usr/include/unistd.h:582:7: note: 'sbrk' has been explicitly marked deprecated here
void    *sbrk(int);
                obuf = sbrk(obs);
/usr/include/unistd.h:582:7: note: 'sbrk' has been explicitly marked deprecated here

any ideas? it looks like something very fundamental with C…

erik quanstrom | 28 Jan 06:43 2015

ahci and intel gbe

i'm quite happy to report that this new haswell hardware worked the first time
with nix 64 bit.  the ahci stuff should "just work" due to the standard, but the
i210 gbe was entered speculatively, and it's pretty nice that it just seems to

so don't let 'em tell you "plan 9 only works with older hardware".  :-)

; pci -v 0.17.4 0.31.2
0.17.4:	disk 01.06.01 8086/8d62  11 0:0000f111 16 1:0000f101 16 2:0000f0f1 16 3:0000f0e1 16 4:0000f021
32 5:fb438000 2048
	Intel Corporation 	C610/X99 series chipset sSATA Controller [AHCI mode] 
0.31.2:	disk 01.06.01 8086/8d02  11 0:0000f071 16 1:0000f061 16 2:0000f051 16 3:0000f041 16 4:0000f001
32 5:fb432000 2048
	Intel Corporation 	C610/X99 series chipset 6-Port SATA Controller [AHCI mode] 

; pci -v 7.0.0 8.0.0
7.0.0:	net  02.00.00 8086/1533  11 0:fb200000 524288 2:0000d001 32 3:fb280000 16384
	Intel Corporation 	I210 Gigabit Network Connection 
8.0.0:	net  02.00.00 8086/1533  10 0:fb100000 524288 2:0000c001 32 3:fb180000 16384
	Intel Corporation 	I210 Gigabit Network Connection 

- erik

Sergey Zhilkin | 27 Jan 07:36 2015

in memories of Uriel 

С наилучшими пожеланиями
Жилкин Сергей
With best regards
Zhilkin Sergey
arisawa | 25 Jan 07:16 2015

protection against resource exhaustion

Hello 9fans

my mac has a protection below:
-bash$ cat foo
-bash$ ./foo
./foo: fork: Resource temporarily unavailable

on the other hand, Plan 9 does not.
kernel is protected against such programs, however they are not killed.
therefore no new process can be created.

does anyone have idea to fix the problem?

Kenji Arisawa

erik quanstrom | 24 Jan 20:48 2015

9atom downtime

looks like a power even took out the motherboard.  hopefully i can find
some parts early next week.

- erik

Winston Kodogo | 22 Jan 22:09 2015

Problem with pf9 on Windows 8.1

Not sure if this is the right place to ask, but I'm trying to run pf9 version of acme on Windows 8.1. If I try to use mouse button 3, it always barfs. Button 3 works fine in sam. Has anyone else had this problem and found a solution?
Steve Simon | 22 Jan 18:31 2015

simple cgi and POST for plan9?

anyone have an example of doing a simple web page with a POST form,
I want somthing like the wiki, but just a single page of text
that can be edited in a form using a POST method.

on plan9 of course.

I know I am being lazy and I just need to RTFM but if somone has a recipie
already done that works...