From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <435CF3D7.60004@lanl.gov> Date: Mon, 24 Oct 2005 08:46:47 -0600 From: Ronald G Minnich User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] xcpu fix for Plan9.c References: <5c8bf6a8e08baeac5171626d7185d563@hera.eonet.ne.jp> In-Reply-To: <5c8bf6a8e08baeac5171626d7185d563@hera.eonet.ne.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 9fb0c296-ead0-11e9-9d60-3106f5b1d025 kokamoto@hera.eonet.ne.jp 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