Commit 3a36e447 authored by Simon Marlow's avatar Simon Marlow
Browse files

crummy fix for Windows

parent 1a6fcb4f
{-# OPTIONS -cpp #-}
import System.IO import System.IO
import System.Process import System.Process
#ifdef mingw32_HOST_OS
cmd = "c:/cygwin/bin/ls"
#else
cmd = "/bin/ls"
#endif
test = do test = do
h <- openFile "output" WriteMode h <- openFile "output" WriteMode
ph <- runProcess "/bin/ls" [] Nothing Nothing Nothing (Just h) Nothing ph <- runProcess cmd [] Nothing Nothing Nothing (Just h) Nothing
waitForProcess ph waitForProcess ph
main = test >> test >> return () main = test >> test >> return ()
{-# OPTIONS -cpp #-}
import System.Process import System.Process
import System.IO import System.IO
#ifdef mingw32_HOST_OS
cmd = "c:/cygwin/bin/ls"
#else
cmd = "/bin/ls"
#endif
main = do main = do
h <- openFile "output" WriteMode h <- openFile "output" WriteMode
ph <- runProcess "/bin/ls" [] Nothing Nothing Nothing (Just h) (Just h) ph <- runProcess cmd [] Nothing Nothing Nothing (Just h) (Just h)
waitForProcess ph waitForProcess ph
return () return ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment