[gambit-list] Cython __cleanup() problem
Marc Feeley
feeley at iro.umontreal.ca
Wed Jan 5 14:43:44 EST 2011
On 2011-01-05, at 12:14 PM, David Dreisigmeyer wrote:
> Then in ipython:
>
>
> Python 2.7.1 (r271:86832, Dec 29 2010, 01:38:09)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.10.1 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
>
> In [2]: import cython_gambit_test
>
> In [3]: cython_gambit_test.cython_gambit_test ()
> result = #!void
> result = 16
> result = #<datum-parsing-exception #2>
> result = #<unbound-global-exception #3>
>
> Process Python exited abnormally with code 1
If I understand correctly, it is Python that is exiting abnormally. In other words it is not during the call to ___cleanup() that the process exits (but to make sure, add a printf just before and just after the call to ___cleanup()).
Assuming that that is true, it looks like a bad interaction between Gambit's runtime system and Python's runtime system. For example, Gambit restoring a signal handler that Python relies on, or changing the terminal settings, the timers, etc. You'll have to dig deeper to find the actual problem (with strace on Linux, I don't remember what it is called on Mac OS X).
If you want a quick an dirty solution, just don't call ___cleanup()!
Marc
More information about the Gambit-list
mailing list