buffering woes

Simon Marlow simonmar@microsoft.com
Thu, 6 Feb 2003 10:42:06 -0000


> >Hal Daume III <hdaume@ISI.EDU> writes:
> >
> > =20
> >
> >>Not for me, GHC 5.04.2 (Solaris).
> >>
> >>here it goes right the first time, but then i have to type two more
> >>letters (in this case 'b\n') to get it to respond to "hello".
> >>   =20
> >>
> >
> >Solaris has a slightly bizarre buffering scheme in "raw" terminal
> >mode, whereby it buffers 4 characters at a time, instead of passing
> >on each character immediately.  Try
> >
> >    stty -icanon min 1
> >
> >(or something similar) to fix it?
> > =20
> >
> Someone must have failed setting the tty mode. :-)
> The 4 is (if I remember right) the VMIN value which is stored in the
> same place as the EOF (^D =3D 4) character.  It has to be set to 0 =
when
> placing the tty in raw mode.

Bingo.

Now fixed, thanks all.

Cheers,
	Simon