#13311: alarm() doesn't work for Cython code
------------------------------------------+----------------------------
Reporter: alexc | Owner: jdemeyer
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.13
Component: c_lib | Resolution:
Keywords: alarm signal interrupt | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues: rebase
Branch: | Commit:
Dependencies: #14029 | Stopgaps:
------------------------------------------+----------------------------
Comment (by jdemeyer):
Replying to [comment:19 pbruin]:
> Generating a `SIGALRM` outside `sig_on()...sig_off()` calls
`PyErr_SetInterrupt()`, which causes Python to raise a `KeyboardInterrupt`
No, it doesn't. It causes IPython to print the string
{{{"KeyboardInterrupt"}}}. See the difference with
{{{
sage: alarm(0.5); sleep(1)
---------------------------------------------------------------------------
AlarmInterrupt Traceback (most recent call
last)
<ipython-input-3-854e6c430970> in <module>()
----> 1 alarm(RealNumber('0.5')); sleep(Integer(1))
/scratch/release/merger/sage-5.13.beta1/local/lib/python2.7/site-
packages/sage/ext/c_lib.so in sage.ext.c_lib.sage_python_check_interrupt
(sage/ext/c_lib.c:1634)()
/scratch/release/merger/sage-5.13.beta1/local/lib/python2.7/site-
packages/sage/ext/c_lib.so in sage.ext.c_lib.sig_raise_exception
(sage/ext/c_lib.c:894)()
AlarmInterrupt:
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/13311#comment:20>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.