[slime-devel] Re: [CMUCL] Problem: Binding socket to port 0
Luke Gorrie
luke at bluetail.com
Thu Jun 24 11:47:07 UTC 2004
case <tbcode at yahoo.com> writes:
> Hi,
>
> I try to install slime (HEAD at Thu Jun 24 12:26:02 MDT 2004) on my
> SGI box. I am running cmucl 18e (see the log below) and it complains
> about a binding to port 0.
> As far as I know, the problem comes from swank.lisp where we read:
>
> (defun start-server (port-file &optional (style *communication-style*)
> dont-close)
> (setup-server 0 (lambda (port) (announce-server-port port-file port))
> style dont-close))
>
> \!/ Notice the (setup-server 0 ... \!/
>
> and:
>
> (defun setup-server (port announce-fn style dont-close)
> (declare (type function announce-fn))
> (let* ((socket (create-socket *loopback-interface* port))
> (port (local-port socket)))
>
> \!/ Notice the 'port' use on the first ligne of the let* which here
> is 0.\!/
Giving zero for the port is intended to mean "use any available port."
I thought that was POSIX or the like but maybe it's not portable.
As a temporary workaround I suggest changing '0' to
'default-server-port'. The downside is that if you try to start a
second SLIME on the same machine with `C-u M-x slime' then it won't be
able to bind the listen socket.
See also the thread started by Stefan Reichör just a now about a
similar issue with CMUCL on FreeBSD.
-Luke
More information about the slime-devel
mailing list