problem with sbcl when it thinks it's not interactive
Subject: problem with sbcl when it thinks it's not interactive
From: Andrey G. Grozin
Date: Mon, 21 Nov 2005 16:39:04 +0600 (NOVT)
Hello *,
There is a problem with sbcl and cmucl based maxima which
makes interactive work with them from TeXmacs next to
impossible. gcl and clisp are OK in this respect.
The problem is not directly related to TeXmacs. You can see
it if you say
cat | maxima -l sbcl
at the command prompt. Then, at the (%i1) prompt, say
something which cause maxima to ask a question, say,
integrate(sqrt(x^2+a),x);
maxima asks about a. OK, let's answer
pos;
After that, maxima hangs, and the only thing to be done
is to kill the process.
The same happens with cmucl, but not gcl or clisp. Of course,
when the input is from a tty (no "cat |"), everything works
fine. It seems that sbcl (and cmucl) check if stdin is a tty,
and if not, they don't do some necessary fflush(stdout); .
So, the question: is it possible to fool sbcl (and cmucl) to
think they use tty for input? (I know a pty can be used, but
this is such a bother...)
Andrey