#17650: alarm broken on cygwin
-------------------------------------+-------------------------------------
       Reporter:  gouezel            |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.5
      Component:  porting: Cygwin    |   Resolution:
       Keywords:  ppl, cygwin        |    Merged in:
        Authors:  Sebastien Gouezel  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/gouezel/alarm_broken_on_cygwin   |  457bfa5062b248f4c36abeda94e84ed7c0acb877
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by gouezel):

 Replying to [comment:14 jpflori]:

 > @sebastien: can you provide a minimal C file reproducing the issue?
 > Maybe something inspired in the aforementioned 2008 post can help.

 I just tried, but unfortunately I was not able to reproduce the issue with
 plain C or C++ files (for instance, taking the file in the link you give
 and adding ppl headers and initialization does not break the itimer
 mechanism).

 For the record, steps to reproduce the issue using python:

 File `alarm.pyx`:
 {{{
 import signal

 def essai(n):
   signal.setitimer(signal.ITIMER_REAL, 0.5 , 0)
   return sum(xrange(n))
 }}}

 File `alarme_c.cpp`
 {{{
 #include <ppl.hh>
 }}}

 File `setup.py`
 {{{
 from distutils.core import setup
 from Cython.Build import cythonize
 from distutils.extension import Extension

 setup(
     ext_modules = cythonize(Extension("alarme", ['alarme.pyx',
 'alarme_c.cpp'], libraries = ['ppl']))
 )
 }}}

 File `essai.py`
 {{{
 import alarme

 print alarme.essai(100000000)
 }}}

 Compile the extension with
 {{{
 python setup.py build_ext --inplace
 }}}

 Then `python essai.py` results in `4999999950000000`, no interruption.

 Commenting out the header inclusion in `alarme_c.cpp`, then one gets
 `Alarm clock` instead.

--
Ticket URL: <http://trac.sagemath.org/ticket/17650#comment:16>
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/d/optout.

Reply via email to