Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- createProcess :: CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)
- runInteractiveProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> IO (Handle, Handle, Handle, ProcessHandle)
- rawSystem :: String -> [String] -> IO ExitCode
- enableProcessJobs :: CreateProcess -> CreateProcess
Redefined functions
createProcess :: CreateProcess -> IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) Source #
createProcess
with process jobs enabled when appropriate.
See enableProcessJobs
.
runInteractiveProcess Source #
:: FilePath | Filename of the executable (see |
-> [String] | Arguments to pass to the executable |
-> Maybe FilePath | Optional path to the working directory |
-> Maybe [(String, String)] | Optional environment (otherwise inherit) |
-> IO (Handle, Handle, Handle, ProcessHandle) |
runInteractiveProcess
with process jobs enabled when
appropriate. See enableProcessJobs
.
rawSystem :: String -> [String] -> IO ExitCode Source #
rawSystem
with process jobs enabled when appropriate.
See enableProcessJobs
.
Additions
enableProcessJobs :: CreateProcess -> CreateProcess Source #
Enable process jobs to ensure accurate determination of process completion
in the presence of exec(3)
on Windows.
Unfortunately the process job support is badly broken in process
releases
prior to 1.6.9, so we disable it in these versions, despite the fact that
this means we may see sporadic build failures without jobs.
On Windows 7 or before the jobs are disabled due to the fact that processes on these systems can only have one job. This prevents spawned process from assigning jobs to its own children. Suppose process A spawns process B. The B process has a job assigned (call it J1) and when it tries to spawn a new process C the C automatically inherits the job. But at it also tries to assign a new job J2 to C since it doesn’t have access J1. This fails on Windows 7 or before.