[project @ 1999-01-15 17:54:20 by sof]
Re-integrated mod. that seems to have been dropped on the floor when new-rts moved back onto the main trunk. Here's the commit msg. that was originally used: 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 a write to h2 causes h2's buffer to overflow or not. This is used to connect 'stderr' and 'stdout', i.e., output on 'stderr' will now cause 'stdout' output to (first) be flushed.
Showing
- ghc/lib/std/IO.lhs 2 additions, 0 deletionsghc/lib/std/IO.lhs
- ghc/lib/std/PrelHandle.lhs 42 additions, 8 deletionsghc/lib/std/PrelHandle.lhs
- ghc/lib/std/cbits/flushFile.c 19 additions, 1 deletionghc/lib/std/cbits/flushFile.c
- ghc/lib/std/cbits/stgio.h 2 additions, 1 deletionghc/lib/std/cbits/stgio.h
Please register or sign in to comment