Just more than a mental note for myself.

If playing with Lispbuilder-sdl you caught the error:


The solution is to locate the stdinc.lisp file under


And change all the occurrences of “putenv” into “setenv”.

Seems ok now. Tested under SBCL 1.0.54

Fixing Slime’s “connection broken by the peer” with Lispbuilder-sdl

Something more than a mental note.
While programming with Common Lisp using the Lispbuilder-sdl library probably you want to evaluate your programs within Emacs and Slime (as usual.)
By the way, even with the simplest SDL program on slime-eval-region (or whatever else) Slime terminate in an expected way with this message:

[…]Connection broken by the peer[…]

Googling hard, I’ve found a solution that works like a charm!
First of all, open your swank.lisp file (you can find it inside your Slime installation), then add this line:

(setf swank:*communication-style* :fd-handler)

Done! It was simple enough, wasn’t it?
Now you can evaluate your lisp game within Emacs!