[project @ 2004-09-29 15:50:51 by simonmar]
[ghc-base.git] / System / Process / Internals.hs
1 {-# OPTIONS -cpp -fffi #-}
2 -----------------------------------------------------------------------------
3 -- |
4 -- Module      :  System.Process.Internals
5 -- Copyright   :  (c) The University of Glasgow 2004
6 -- License     :  BSD-style (see the file libraries/base/LICENSE)
7 -- 
8 -- Maintainer  :  libraries@haskell.org
9 -- Stability   :  experimental
10 -- Portability :  portable
11 --
12 -- Operations for creating and interacting with sub-processes.
13 --
14 -----------------------------------------------------------------------------
15
16 -- #hide
17 module System.Process.Internals (
18         ProcessHandle(..), PHANDLE,
19   ) where
20
21 #if !defined(mingw32_TARGET_OS) && !defined(__MINGW32__)
22 import System.Posix.Types ( CPid )
23 #else
24 import Data.Word ( Word32 )
25 #endif
26
27 -- ----------------------------------------------------------------------------
28 -- ProcessHandle type
29
30 {- | A handle to a process, which can be used to wait for termination
31      of the process using 'waitForProcess'.
32
33      None of the process-creation functions in this library wait for
34      termination: they all return a 'ProcessHandle' which may be used
35      to wait for the process later.
36 -}
37 #if !defined(mingw32_TARGET_OS) && !defined(__MINGW32__)
38 type PHANDLE = CPid
39 #else
40 type PHANDLE = Word32
41 #endif
42
43 newtype ProcessHandle = ProcessHandle PHANDLE