On 2011-01-05, at 4:09 PM, David Dreisigmeyer wrote:
The "sudo dtruss ipython" prints out a whole bunch of stuff but never allows me to use a prompt. I tried it with python also but it doesn't start.
There was an fflush(stdout) in the C code before the call to __cleanup(). This code works as long as __cleanup() is commented out:
void gambit_eval( char *in_str ) { char *temp;
temp = eval_string (in_str); if (temp != 0){ printf ("Gambit-C > %s", temp); } else { printf ("Error: temp == 0"); } ___release_string (temp); fflush (stdout); ___cleanup (); }
Wait... are you calling ___cleanup() every time you evaluate something?
That won't work! The call to ___setup(...) is balanced by a call to ___cleanup(). In between those calls, you can call Scheme functions (such as eval_string).
Marc