1 -- Sigbjorn and I don't understand what this test is meant to do
2 -- It simply hangs on stdin!
8 main = getArgs >>= \ [user,host] ->
9 let username = (user ++ "@" ++ host) in
10 openFile username ReadWriteMode >>= \ cd ->
11 hSetBuffering stdin NoBuffering >>
12 hSetBuffering stdout NoBuffering >>
13 hSetBuffering cd NoBuffering >>
14 hPutStr cd speakString >>
17 speakString = "Someone wants to speak with you\n"
20 (hReady cd >>= \ ready ->
21 if ready then (hGetChar cd >>= putChar)
24 hReady stdin >>= \ ready ->
25 if ready then (getChar >>= hPutChar cd)