Comments on getProcessID
This commit is contained in:
parent
9fc0ea0f24
commit
2de3b1180b
@ -237,10 +237,11 @@ mkdir0700 dir = createDirectory dir
|
|||||||
System.Posix.Directory.createDirectory dir ownerModes
|
System.Posix.Directory.createDirectory dir ownerModes
|
||||||
-}
|
-}
|
||||||
|
|
||||||
-- | getProcessId, stolen from GHC
|
-- | getProcessId, stolen from GHC (main/SysTools.lhs)
|
||||||
--
|
--
|
||||||
#ifdef __MINGW32__
|
#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
|
#else
|
||||||
getProcessID :: IO Int
|
getProcessID :: IO Int
|
||||||
getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral
|
getProcessID = System.Posix.Internals.c_getpid >>= return . fromIntegral
|
||||||
|
Loading…
x
Reference in New Issue
Block a user