[gambit-list] __cleanup() problem (OS X 10.6.6 / Gambit-C 4.6.0)
Marc Feeley
feeley at iro.umontreal.ca
Wed Jan 12 14:13:21 EST 2011
On 2011-01-12, at 1:43 PM, David Dreisigmeyer wrote:
> Hi Marc,
>
> Looks like you may have taken care of the Undefined symbols:
> "_environ" 2 weeks ago(?):
>
> http://www.iro.umontreal.ca/~gambit/repo/.cgit.cgi/Gambit/commit/?id=efd3292ef4ab236a496cd5ce03aa81cff1ef3052
Yes... I was just going to mention it.
>
> Everything seems to work now.
>
> One thing is with this:
>
> /* Cleanup the Scheme library */
>
> printf ("Starting cleanup...1\n");
> fflush (stdout);
>
> printf ("Starting cleanup...2\n");
> fflush (stdout);
>
> ___cleanup ();
>
> printf ("Cleanup successful\n");
> fflush (stdout);
>
> at the end of client.c, "Cleanup successful\n" is written to test8.out
> but is not written out to the terminal ("Starting cleanup...2\n" is
> written to both).
>
> I am still getting "Process Python exited abnormally with code 1" when
> I call __cleanup().
>
> Thanks again.
>
> -Dave
It sounds like a bad interaction between Gambit's terminal settings and Python's.
Try commenting out the body of ___device_tty_cleanup in lib/os_tty.c so that you only keep:
return ___FIX(___NO_ERR);
Then try to only keep
#ifdef USE_POSIX
if (close (d->fd) < 0)
return err_code_from_errno ();
#endif
return ___FIX(___NO_ERR);
Let me know which combination works.
Marc
More information about the Gambit-list
mailing list