From: panne Date: Sat, 9 Oct 2004 07:51:06 +0000 (+0000) Subject: [project @ 2004-10-09 07:51:06 by panne] X-Git-Tag: nhc98-1-18-release~217 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=24b2eda5dc27cc9351734e86635f8bcc6f95cc16;p=ghc-base.git [project @ 2004-10-09 07:51:06 by panne] Unbreak Hugs by moving pPrPr_disableITimers and execvpe to System.Posix.Internals (base package) and use it from System.Posix.Process (unix package). --- 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