[Haskell-cafe] System.Posix, forked processes and psuedo terminals on Linux

Erik de Castro Lopo mle+hs at mega-nerd.com
Sat Aug 21 03:34:24 EDT 2010


Donn Cave wrote:

> My guess is that the default tty attributes include ECHO.  So the
> data you write to the master fd is echoed back, as though by the
> fork process but actually by the terminal driver.  You can turn
> ECHO off.

Thanks very much Donn, that was an excellent guess.

Adding:

	attr <- getTerminalAttributes fd
	setTerminalAttributes fd (withoutMode attr EnableEcho) Immediately

at the top of the runParent process gave me the results I expected.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the Haskell-Cafe mailing list