[project @ 1998-11-23 15:44:21 by sof]
authorsof <unknown>
Mon, 23 Nov 1998 15:44:25 +0000 (15:44 +0000)
committersof <unknown>
Mon, 23 Nov 1998 15:44:25 +0000 (15:44 +0000)
commitbbe9c55569ffa1ea660a02d7349afb4ba659072d
tree7b8e6b964012cdda16a1bdf2b092719cc0d04af7
parent9a13d5c84f7467ea29fc7e50b7257585e9c1cee7
[project @ 1998-11-23 15:44:21 by sof]
Extend hConnectTo to also allow output handles to be connected, i.e.,

    h1 <- openFile "foo" WriteMode
    h2 <- openFile "bar" WriteMode
    hConnectTo h1 h2

  will cause h1's buffer to be flushed when h2's buffer overflows
  (and it is just about to be flushed.) The implementation is currently
  not as lazy as that, it flushes h1's buffer regardless of whether h2's
  buffer overflows or not.

  This is used to connect 'stderr' and 'stdout', i.e., output on
  'stderr' will now cause 'stdout' output to (first) be flushed.
ghc/lib/std/IO.lhs
ghc/lib/std/PrelHandle.lhs
ghc/lib/std/cbits/filePutc.lc
ghc/lib/std/cbits/flushFile.lc
ghc/lib/std/cbits/stgio.h
ghc/lib/std/cbits/writeFile.lc