X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FProcess%2FInternals.hs;h=eb16d368bb82ecaaa97c54bf31ca270e27853c65;hb=24b2eda5dc27cc9351734e86635f8bcc6f95cc16;hp=09aa376b46d58b540f850992ad150ee4608e8349;hpb=5b99f2cf15cb6f9604abe884eafe293ae0c60cf0;p=ghc-base.git diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs index 09aa376..eb16d36 100644 --- a/System/Process/Internals.hs +++ b/System/Process/Internals.hs @@ -15,7 +15,7 @@ -- #hide module System.Process.Internals ( - ProcessHandle(..), PHANDLE, + ProcessHandle(..), PHANDLE, pPrPr_disableITimers, c_execvpe ) where #if !defined(mingw32_TARGET_OS) && !defined(__MINGW32__) @@ -23,6 +23,13 @@ import System.Posix.Types ( CPid ) #else import Data.Word ( Word32 ) #endif +import Foreign.C.String ( CString ) +import Foreign.C.Types ( CInt ) +import Foreign.Ptr ( Ptr ) + +#ifdef __HUGS__ +{-# CBITS execvpe.c #-} +#endif -- ---------------------------------------------------------------------------- -- ProcessHandle type @@ -41,3 +48,13 @@ type PHANDLE = Word32 #endif newtype ProcessHandle = ProcessHandle PHANDLE + +-- ---------------------------------------------------------------------------- + +-- this function disables the itimer, which would otherwise cause confusing +-- signals to be sent to the new process. +foreign import ccall unsafe "pPrPr_disableITimers" + pPrPr_disableITimers :: IO () + +foreign import ccall unsafe "execvpe" + c_execvpe :: CString -> Ptr CString -> Ptr CString -> IO CInt