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



On 5/10/06, Gerd Kortemeyer <korte at lite.msu.edu> wrote:

> 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.

This much is straightforward in C using POSIX function calls,
so it should be straightforward in any Lisp implementation which
makes available whatever POSIX stuff is needed. I haven't actually
tried it in Lisp. Probably a workable strategy at this point would be
to pick one implementation, say SBCL, and post a question to their
mailing list about it. Maybe I'll go ahead and do that.

> 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.

Not sure what you mean here. Maybe you can post a more detailed
message about this.

> 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 ...

Yes, it probably won't work on Windows. It's too bad about that.

Robert