[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

Reply via email to