~singpolyma/cheogram

74bf9b4e150362a52fa75e400b622cbb17ce238b — Stephen Paul Weber 6 years ago 69049f9
Force line buffering on outputs
1 files changed, 4 insertions(+), 0 deletions(-)

M Main.hs
M Main.hs => Main.hs +4 -0
@@ 1,6 1,7 @@
{-# LANGUAGE PackageImports #-}
import Prelude (show, read)
import BasicPrelude hiding (show, read, forM_, mapM_, getArgs, log)
import System.IO (stdout, stderr, hSetBuffering, BufferMode(LineBuffering))
import Data.Char
import Control.Concurrent
import Control.Concurrent.STM


@@ 1096,6 1097,9 @@ openTokyoCabinet pth = TC.runTCM $ do
	return db

main = do
	hSetBuffering stdout LineBuffering
	hSetBuffering stderr LineBuffering

	putStrLn $ fromString "Starting..."
	(name:host:port:secret:vitelityJid:vitelityPassword:conferences) <- getArgs
	db <- openTokyoCabinet "./db.tcdb" :: IO TC.HDB