From 2de3b1180b80eef3acfb3faf2e137bc9b6d8c997 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Wed, 4 May 2005 00:15:58 +0000 Subject: [PATCH] Comments on getProcessID --- src/plugins/Plugins/MkTemp.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/Plugins/MkTemp.hs b/src/plugins/Plugins/MkTemp.hs index 0d337c6..e75fc0d 100644 --- a/src/plugins/Plugins/MkTemp.hs +++ b/src/plugins/Plugins/MkTemp.hs @@ -237,10 +237,11 @@ mkdir0700 dir = createDirectory dir System.Posix.Directory.createDirectory dir ownerModes -} --- | getProcessId, stolen from GHC +-- | getProcessId, stolen from GHC (main/SysTools.lhs) -- #ifdef __MINGW32__ -foreign import ccall unsafe "_getpid" getProcessID :: IO Int +-- relies on Int == Int32 on Windows +foreign import ccall unsafe "_getpid" getProcessID :: IO Int #else getProcessID :: IO Int getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral