ref: 9faf1dec1c5cef20366e2e5babc94e4376a8bb18
dir: /lib/System/Process.hs/
module System.Process(callCommand) where
import Prelude
import Control.Monad(when)
import Foreign.C.String
foreign import ccall "system" systemc :: CString -> IO Int
callCommand :: String -> IO ()
callCommand cmd = do
r <- withCAString cmd systemc
when (r /= 0) $
error $ "callCommand: failed " ++ show r ++ ", " ++ show cmd