I am looking for any info regarding exception handling in clisp.
The problem is like this: I have two programs running on two sides
(server and client) of a socket. When the server crashes, any attempt by
the client to send or receive a message would lead to the client's
crash. I would like to have a solution so that the client can detect the
crash of the server, and wait for its recovery instead of simple crash
Please let me know if you have any good solution to this. Thank you very
On Thu, 17 Oct 2002, Fuliang Weng (RTC) wrote:
> (server and client) of a socket. When the server crashes, any attempt by
> the client to send or receive a message would lead to the client's
Huh? Maybe the client is dying due to an unhandled SIGPIPE after
writing on the socket?
> I would like to have a solution so that the client can detect the
> crash of the server, and wait for its recovery instead of simple crash
> and restart.
If you can turn the socket error into a condition, then you have the
condition handling system in Lisp at your disposal. The code
surrounding the socket operation has the expertise on how to reconnect
to the server, or on how to recover itself if that is not wanted.
To choose the course of action, it can provide restarts for all of them
and signal an error, to get advice from higher level code.
Read about restart-case, handler-bind, invoke-restart, error,
define-condition, signal and friends.
Get latest updates about Open Source Projects, Conferences and News.