|
From: Mads L. <mad...@ya...> - 2005-04-30 17:27:45
|
Hi
I am trying to use the processExecAsyncTimed. In the
program shown below, I basically use this function to
do "ls -l /usr/bin". The result of "ls" are printed to
the screen. I all seems to be going fine, except that
I get two "@" on the screen. Is this a bug ?
To replicate the problem the easiest thing is to :
> ghc --make -package wx ProcessTestFailure.hs
> ./a.out | grep -A 3 -B 3 "@"
Greetings,
Mads Lindstrøm
module Main where
import Graphics.UI.WX
import Graphics.UI.WXCore
-- Compile with: ghc --make -package wx
ProcessTestFailure.hs
main :: IO ()
main = start $ processTest
processTest :: IO ()
processTest
= do f <- frame [text := "Test",
clientSize := sz 600 400]
(send,process,pid) <- processExecAsyncTimed f
"ls -l /usr/bin" True
onEndProcess
onReceive
onReceive
return ()
where
onEndProcess exitcode
= do putStr ("onEndProcess:" ++ show
exitcode ++ "\n")
onReceive txt streamStatus
= do putStr $ "OnReceive: " ++ txt ++
"\n"
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|