On Jan 21, 4:19 pm, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote: > On 2011-01-21 04:44, Dima Pasechnik wrote:> In my case abort() will happen > for potentially many different reasons. > > So I'd like to have > > > #include "c_lib/include/interrupt.h" > > char[1000] errmessage > > void libgap_errors() > > { > > set_sage_signal_handler_message(errmessage); > > abort(); > > } > > > and set errmessage in the Cython code. > > Will this work? > > Yes, that would work.
yes, it appears to work, great! I only had to use _sig_on/_sig_off in place of sig_on()/sig_off(). (I use an unpatched Sage 4.6.1 installation) What is the right way to specify the path to Python includes in Sage's spkg-install scripts, is there a convention on this? > > > It would be even more natural to call set_sage_signal_handler_message > > after abort() > > That will not be possible, because abort() invokes the signal handling > machinery which in turn then longjmp()s. So there is no "after abort()". > > Jeroen. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org