ProcessHandle(..), PHANDLE,
#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
pPrPr_disableITimers, c_execvpe,
- runProcessPosix, ignoreSignal, defaultSignal,
+# ifdef __GLASGOW_HASKELL__
+ runProcessPosix,
+# endif
+ ignoreSignal, defaultSignal,
#endif
commandToProcess,
withFilePathException, withCEnvironment
#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
import System.Posix.Types ( CPid )
+# ifdef __GLASGOW_HASKELL__
import GHC.IOBase ( haFD, FD, Exception(..), IOException(..) )
import GHC.Handle ( stdin, stdout, stderr, withHandle_ )
+# elif __HUGS__
+import Hugs.Exception ( Exception(..), IOException(..) )
+# endif
import System.IO ( Handle )
import Data.Maybe ( fromMaybe )
#else
#endif
+#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
+
+#ifdef __GLASGOW_HASKELL__
-- -----------------------------------------------------------------------------
-- POSIX runProcess with signal handling in the child
-#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
-
runProcessPosix
:: String
-> FilePath -- ^ Filename of the executable
set_int inthand set_quit quithand
return (ProcessHandle ph)
-ignoreSignal = CONST_SIG_IGN :: CLong
-defaultSignal = CONST_SIG_DFL :: CLong
-
foreign import ccall unsafe "runProcess"
c_runProcess
:: Ptr CString -- args
-> CLong -- SIGQUIT handler
-> IO PHANDLE
+#endif /* __GLASGOW_HASKELL__ */
+
+ignoreSignal = CONST_SIG_IGN :: CLong
+defaultSignal = CONST_SIG_DFL :: CLong
+
#endif
-- ----------------------------------------------------------------------------