Re: fork in Lisp? was: Maxima servermode: stability of commands....



Hi Robert,

On May 10, 2006, at 3:41 PM, Robert Dodier wrote:
>
>> The symptoms were the following: on the laptop, I got my initial
>> input echoed back to me, ....
>
> OK, one aspect that differs between Clisp and SBCL is that Clisp
> runs readline by default, and SBCL doesn't. Readline might be
> interfering -- just a guess.

That sounds like a very likely explanation! At least it would explain  
the symptoms.

>
> What do you think about arranging the classic server mode in which
> the server listens for connections and then executes fork/exec for
> each client? That would guarantee a fresh, isolated environment for
> every client, and it would be faster than relaunching Maxima.
> It would almost certainly depend on details of the Lisp  
> implementation;
> I don't see that as a showstopper, as they say.

Of course I would love that! The server should fork a new process  
when a client connects, and be able to process several commands/ 
replies until the client disconnects, so that you maintain state  
while connected. At disconnect, the child dies.

The server mode should also provide a more predictable command/answer  
sequence and leave out the line counters (%oN) and prompts ($iN), as  
well as all the whitespace.

But I was hesitant to ask, since I cannot help with that at the  
moment. I might find a student who "speaks" Lisp, whom I could pay,  
but in the past, even in a large place like MSU, it has been hard to  
find good programmers.

I think operating system is an issue here - I am interested in a  
Linux implementation ... I don't even know what forking would look  
like in Windows ...

So I could help a little with a Linux implementation of this, but  
learning Lisp (which I have never written or as much as looked at) is  
a challenge for me.

- Gerd.