Simon Marlow wrote:
> 
> > Perhaps this is a related problem: Haskell programs compiled ghc-4.04
> > (or 4.05, I can't remember exactly) sometimes totally screw up the
> > communication between Bash and XEmacs in a shell buffer: Bash seems
> > to receive an infinite stream of char 255 (=> .bash_history grows
> > to dozens of Megs) after a Haskell program terminates. I've got no
> > idea why and when exactly this happens, but I hope somebody
> > else has...
> > :-)
> 
>         1. Bash tries to read from stdin
>         2. stdin is set to non-blocking mode
>         3. read returns -1, errno = EAGAIN
>         4. Bash thinks -1 is char 255 and
>            doesn't bother to check errno
>         5. see 1 :-)
> 
> Just guessing,
>         Simon
There is a known bug (in the sense that I reported it some time ago)
that causes GNU readline and hence Bash trouble on Sparc/Solaris with
character codes >=128.  This is because by default Sparc/Solaris uses
signed characters.  Thus I am currently using a version of bash and
readline compiled with the gcc option which forces unsigned characters.
I don't know if this has anything to do with the above problem . . .

Reply via email to