-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{-# LANGUAGE CPP #-} | ||
|
||
{-| | ||
This module makes the operations exported by @System.Posix.Process@ | ||
available on all platforms. On POSIX systems it re-exports operations from | ||
@System.Posix.Process@, on other platforms it emulates the operations as far | ||
as possible. | ||
-} | ||
module System.PosixCompat.Process ( | ||
getProcessID | ||
) where | ||
|
||
#ifdef mingw32_HOST_OS | ||
|
||
import System.Posix.Types (ProcessID) | ||
import System.Win32.Process (getCurrentProcessID) | ||
|
||
getProcessID :: IO ProcessID | ||
getProcessID = fromIntegral <$> getCurrentProcessID | ||
|
||
#else | ||
|
||
import System.Posix.Process | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters