#10818: EclLib should allow signals to make LISP code interruptable
------------------------------------------+---------------------------------
Reporter: nbruin | Owner: was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: interfaces | Keywords: lisp ecl signal
interrupt
Author: Nils Bruin, Jeroen Demeyer | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------------------+---------------------------------
Changes (by newvalueoldvalue):
* reviewer: Jeroen Demeyer =>
* author: Nils Bruin => Nils Bruin, Jeroen Demeyer
Old description:
> Presently, ecllib does not enable signals when executing ecl code. This
> makes LISP code uninterruptable:
> {{{
> sage: from sage.libs.ecl import *
> sage: ecl_eval("(setf i 0)")
> <ECL: 0>
> sage: inf_loop=ecl_eval("(defun infinite() (loop (incf i)))")
> sage: inf_loop() #DON'T DO THIS! (bye bye)
> }}}
> The signal handling in ECL should be studied a bit more to ensure that we
> are safely interacting with it. The attached patch just inserts
> {{{sig_on()/sig_off()}}} around the possibly slow parts. This seems to
> work, but I suspect it might leave ECL in an inconsistent state.
>
> When testing this patch, absolutely test it to '''sage-4.7.alpha1 or
> later''' since interrupts were completely rewritten (see #9678).
>
> Apply [attachment:handlerswap.p2.patch]
New description:
Presently, ecllib does not enable signals when executing ecl code. This
makes LISP code uninterruptable:
{{{
sage: from sage.libs.ecl import *
sage: ecl_eval("(setf i 0)")
<ECL: 0>
sage: inf_loop=ecl_eval("(defun infinite() (loop (incf i)))")
sage: inf_loop() #DON'T DO THIS! (bye bye)
}}}
The signal handling in ECL should be studied a bit more to ensure that we
are safely interacting with it. The attached patch just inserts
{{{sig_on()/sig_off()}}} around the possibly slow parts. This seems to
work, but I suspect it might leave ECL in an inconsistent state.
When testing this patch, absolutely test it to '''sage-4.7.alpha1 or
later''' since interrupts were completely rewritten (see #9678).
Apply [attachment:10818_handlerswap.p3.patch]
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10818#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.