Quoth Erik de Castro Lopo <[email protected]>,
...
> The code below *almost* works. Its currently printing out:
>
>     parent : Forked child was here!
>     parent : Message from parent.
>     Read 21 bytes
>
> while I think it should print:
>
>     parent : Forked child was here!
>     parent : Read 21 bytes
>
> Any clues on why 'Message from parent.' is also ending up on
> stdout? This is ghc-6.12.1 on Debian Linux.

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.

        Donn Cave, [email protected]
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to