Skip to content

EclLib should allow signals to make LISP code interruptable #10818

@nbruin

Description

@nbruin

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.

When testing this patch, absolutely test it to sage-4.7.alpha1 or later since ECL was updated (#10766) and interrupts were completely rewritten (#9678).

Apply attachment: 10818_handlerswap.p4.patch

CC: @kiwifb @jdemeyer @kcrisman

Component: interfaces

Keywords: lisp ecl signal interrupt

Author: Nils Bruin, Jeroen Demeyer

Reviewer: Jean-Pierre Flori

Merged: sage-4.7.1.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/10818

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions