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
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to