[gambit-list] __cleanup() problem (OS X 10.6.6 / Gambit-C 4.6.0)

David Dreisigmeyer dwdreisigmeyer at gmail.com
Wed Jan 12 15:44:26 EST 2011


Marc, I modified ___cleanup as follows:

-------------------------------------------------------

___EXP_FUNC(void,___cleanup) ___PVOID
{
  /*
   * Only do cleanup once after successful setup.
   */

  if (setup_state != 1)
    return;

  setup_state = 2;

  //___cleanup_mem ();
  //___cleanup_os ();
}

-------------------------------------------------------

This seems a bit odd... I do this in ipython:

Process Python finished
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 gambit

In [3]: gambit.cleanup ()
Starting cleanup
Finished cleanup
Gambit-C cleanup complete

In [4]: gambit.setup ()
Gambit-C setup successful

In [5]: gambit.cleanup ()
Starting cleanup

Process Python exited abnormally with code 1





On Wed, Jan 12, 2011 at 3:07 PM, David Dreisigmeyer
<dwdreisigmeyer at gmail.com> wrote:
> I had already tried commenting out ___cleanup_mem and ___cleanup_os.
> Only having ___cleanup_mem causes Python to exit also.  I was just
> going to look at this a bit more.  I'll try to comment out
> ___cleanup_mem first and see which of the lines in ___cleanup_os is
> causing the trouble.
>
> On Wed, Jan 12, 2011 at 2:59 PM, Marc Feeley <feeley at iro.umontreal.ca> wrote:
>>
>> On 2011-01-12, at 2:36 PM, David Dreisigmeyer wrote:
>>
>>> Niether of these worked for Python.  However, the first one did cause
>>> "Cleanup successful\n" to be printed to the screen when calling client
>>> in gambit/tests.
>>
>> Good to know.
>>
>> For the Python problem could you comment out each line of ___cleanup_os in turn to see which call causes the problem :
>>
>> void ___cleanup_os ___PVOID
>> {
>>  ___cleanup_io_module ();
>>  ___cleanup_tty_module ();
>>  ___cleanup_dyn_module ();
>>  ___cleanup_files_module ();
>>  ___cleanup_shell_module ();
>>  ___cleanup_time_module ();
>>  ___cleanup_base_module ();
>> }
>>
>> ___cleanup_os is at the end of lib/os.c .
>>
>> Marc
>>
>>
>



More information about the Gambit-list mailing list