[Ecls-list] ECL-generated executables and restarts
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Sun Jan 23 18:01:51 UTC 2011
I have fixed the function that is invoked when a Ctrl-C arrives to the
program. With that change, and a modified program, your expectations should
be met :-)
The program:
(format t "~%Let's read~%")
(let ((line nil))
(restart-case
(setf line (read-line)) ; IO sleep
(my-restart ()
(format t "~%ABORTING!")
(ext:quit)))
(format t "~%Line: ~S" line))
(ext:quit)
Building it:
$ ecl -norc -eval '(require :cmp)' -eval '(c::build-program "program"
:lisp-files (list (compile-file "foo" :system-p t)))' -eval '(quit)'
A sample session:
$ ./program
Let's read
^C ^C
Condition of type: INTERACTIVE-INTERRUPT
Console interrupt
Available restarts:
1. (CONTINUE) CONTINUE
2. (MY-RESTART) MY-RESTART
Top level in: #<process TOP-LEVEL>.
> :r1
The line typed again
Line: "The line typed again"
Can I consider this to be fixed?
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110123/eb96af99/attachment.html>
More information about the ecl-devel
mailing list