Donate Share

CLISP - an ANSI Common Lisp

Tracker: Feature Requests

5 primitive to restart - ID: 1789478
Last Update: Comment added ( sf-robot )

This would specially be useful from an *inferior-lisp* buffer in Emacs (M-x
run-lisp)

A primitive, maybe (ext:restart) which re-start the entire Lisp process; on
Unix it could just execvp the initial program arguments (as seen by the
main() entry point of the Clisp interpreter).

If the idea sounds interesting to someone, I might perhaps be able to
submit a patch.

If it already exists, I am interested.

Regards.

Basile Starynkevitch


Basile STARYNKEVITCH ( bstarynk ) - 2007-09-06 15:32

5

Closed

Rejected

Sam Steingold

Extend ANSI CL

None

Public


Comments ( 5 )

Date: 2007-09-21 02:20
Sender: sf-robotSourceForge.net Site Admin


This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2007-09-06 16:34
Sender: sdsProject AdminAccepting Donations


large heap should be eliminated by GC, check your roots.

can you name a program that restarts itself?
(as opposed to its parent restarting it when necessary).



Date: 2007-09-06 16:16
Sender: bstarynk


Another possible use might be inside a long-standing process, like a
FastCGI server. For example it could make sense to restart a CLISP running
a FastCGI when the heap is becoming too big.


Date: 2007-09-06 16:13
Sender: bstarynk


The typical scenario is to restart from scratch and (load "foo.lisp")
again. For example, a missing parenthesis makes obviously (load "foo.lisp")
fail in the middle of several definitions...

Such a function (IIRC Scheme48 had something similar) would avoid the user
to kill the lisp or slime buffer.

Regards.


Date: 2007-09-06 16:07
Sender: sdsProject AdminAccepting Donations


Thank you for your suggestion, but I am not sure this is such a grand
idea.

first, you can implement something like that using ext:argv
(http://clisp.cons.org/impnotes/environment-dict.html#argv).

second, and more importantly, you want to restart the CLISP
process when something goes seriously wrong,
and then you probably can't really rely on CLISP doing TRT.
instead, you should teach Emacs to restart its inferior-lisp process:

(defun my-il-restart ()
"Restart the current inferior-lisp."
(interactive)
(let* ((buf (get-buffer "*inferior-lisp*)) ; or whatever
(com (process-command (get-buffer-process buf))))
(with-current-buffer buf
(comint-exec buf (buffer-name buf)
(car com) nil (cdr com)))))


ps. restart is a name of a CL class
(http://www.lisp.org/HyperSpec/Body/syscla_restart.html).
you probably want to name it ext:reexec-lisp-process

pps. I am marking this "rejected/pending",
the RFE will be automatically closed in 2 weeks
unless you get back with an explanation why this is a good idea
(e.g., "all the other lisps do that and SLIME cannot support CLISP without
it").


Attached File

No Files Currently Attached

Changes ( 9 )

Field Old Value Date By
close_date 2007-09-06 16:34 2007-09-21 02:20 sf-robot
status_id Pending 2007-09-21 02:20 sf-robot
close_date - 2007-09-06 16:34 sds
status_id Open 2007-09-06 16:34 sds
status_id Pending 2007-09-06 16:13 bstarynk
close_date 2007-09-06 16:07 2007-09-06 16:13 bstarynk
close_date - 2007-09-06 16:07 sds
resolution_id None 2007-09-06 16:07 sds
status_id Open 2007-09-06 16:07 sds