9p write acme/acme/edit not coming thru

143 views
Skip to first unread message

Niko Schwarz

unread,
Jun 10, 2013, 4:09:32 PM6/10/13
to plan9p...@googlegroups.com
The following command comes back with an error and does nothing:

$ echo 'Edit x/n/ d' | 9p write acme/acme/edit 
9p: fsopen acme/edit: file 'acme/edit' not found

The exact same command is a bit tricky to run inside acmeSAC, so I ran another one. This one behaves as expected (it prints the current window):

cat /mnt/acme/acme/body

But in 9p, nothing works:

$ read acme/acme/body
9p: fsopen acme/body: file 'acme/body' not found

The strangest behavior is this:

$ mackay:acme nes$ echo hi | 9p write /acme/new
9p: mount: dial unix!/tmp/ns.nes._tmp_launch-HARC6z_org.macosforge.xquartz:0/: connect /tmp/ns.nes._tmp_launch-HARC6z_org.macosforge.xquar

This opens a new window in acme, but it does NOT contain the words "hi".

You see, it's all a bit strange :)

Russ Cox

unread,
Jun 24, 2013, 2:43:35 PM6/24/13
to niko.s...@googlemail.com, plan9port-dev
When you use the 9p command, the first path element names the server to connect to (here, acme). The rest is passed to the server. The paths you get back in errors will be one element shorter because the server doesn't see that first element. For example '9p read acme/index' asks the acme server for just '/index'. 

acme/new is a directory that, each time you enter it, creates a new window. You can't write directly to the directory but you can write to the window control files inside it. 
    echo hi | 9p write acme/new/body.

Inline image 1

Screen Shot 2013-06-24 at 2.42.03 PM.png
Reply all
Reply to author
Forward
0 new messages