Thank you very much, Ron.

I just reconfirmed my expeience also here at work.
(I'm using Geoff's (or Ken's) file server just now.)

In this case, I got more curious result as follows:

This time, I'm doing this all on a terminal.

term% xcpusrv -sxcpu
....
term% mount -ac /srv/xcpu /mnt/xcpu
term% openclone /mnt/xcpu
(then on a newly created rio window)
term% cat /mnt/xcpu/clone
65537term%    <=============here! not 65536!
term% ls -l /mnt/xcpu
--rw-rw-rw- M 66 ssh ssh 0 Jan  1  1970 /mnt/xcpu/65536  <========= not 65537!
--rw-rw-rw- M 66 ssh ssh 0 Jan  1  1970 /mnt/xcpu/clone

On the point why only once copy of execution file, I didn't noticed
the danger of your example /bin/sh execution.  Now, I think why
you chose that way.   So, in xcpu we should do only batch job, right?

On the xsh.c, I still have some problem.
Isn't this a program to be used for a cluster environment?

In the file, there is a line of
        dirno[nodeno++] = smprint("/%s/%s/xcpu/%s", base, s, buf);

here, I suppose we should name our cluster's cp server by s,
such as
/mnt/xcpu/"s"/xcpu/"number", right?

So, we have only one cpu server, then we should use the xsh command
like 
term% xsh 0 
?

Or if we have many cpu server, then

xsh 0 1 2 3 4 5 6 7
?

By the way, in your mkfile-plan9

$O.xsh: xsh.$O P9pshell.$O
        $LD -o $target $prereq $LDFLAGS

should be
$O.xsh: xsh.$O Plan9shell.$O    <============
        $LD -o $target $prereq $LDFLAGS
, I suppose.

Kenji
--- Begin Message ---
[EMAIL PROTECTED] wrote:

1) why I got 131072 instead of 0 or 1?
    Am I on the right way?

you are. I've had to go to this stilly numbering scheme to handle some LInux issues. It's a dentry cache thing, I can find the email and describe the problem if you wish. As nice as the dentry cache in Linux is, it is perilous when you venture outside its 'modus operandi'.

2) why the /mnt/cpu/131072/exec file accepts cp command
    only once?

this is intentional. Consider the open of the clone file as a 'session'. In the original xcpu, as written by Vic Zandy, you could do all kinds of execs for a single session:
cp /bin/date exec
echo exec > ctl
cp /bin/whoami exec
echo exec > ctl

I initially copied this style for this implementation of xcpu.

There are lots of problems here, and it turned out to be simpler to just allow one and only one exec per session. Note that the child you start can also exec lots of things:
cp /bin/sh exec
echo exec > ctl

Please look at xsh.c -- it is what I am hoping people will actually use. The interface presented by the server is very low level -- by intent -- and xsh is something like what I think people will use.

Andrey starts here tomorrow,so we will be getting his help on this too :-)

Thanks so much for trying this out, and for getting your comments out to the list.

ron

--- End Message ---

Reply via email to