From: simonmar Date: Mon, 28 Jan 2002 13:34:10 +0000 (+0000) Subject: [project @ 2002-01-28 13:34:10 by simonmar] X-Git-Tag: Approximately_9120_patches~248 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a7549035e46b5306ef8e579652580a864ee0b16a;p=ghc-hetmet.git [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. --- 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"]