From a7549035e46b5306ef8e579652580a864ee0b16a Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 28 Jan 2002 13:34:10 +0000 Subject: [PATCH] [project @ 2002-01-28 13:34:10 by simonmar] Set stdin to unbuffered, so that GHCi doesn't accidentally buffer any input that might be intended for the program. --- ghc/compiler/ghci/InteractiveUI.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index bb84229..b09690b 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,6 +1,6 @@ {-# OPTIONS -#include "Linker.h" -#include "SchedAPI.h" #-} ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.111 2002/01/28 12:01:12 simonmar Exp $ +-- $Id: InteractiveUI.hs,v 1.112 2002/01/28 13:34:10 simonmar Exp $ -- -- GHC Interactive User Interface -- @@ -173,6 +173,10 @@ interactiveUI cmstate paths cmdline_libs = do Just hval -> writeIORef flush_stdout (unsafeCoerce# hval :: IO ()) _ -> panic "interactiveUI:stdout" + -- We don't want the cmd line to buffer any input that might be + -- intended for the program, so unbuffer stdin. + hSetBuffering stdin NoBuffering + -- initial context is just the Prelude cmstate <- cmSetContext cmstate dflags [] ["Prelude"] -- 1.7.10.4