|
System.Process.Internals | Portability | portable | Stability | experimental | Maintainer | libraries@haskell.org |
|
|
|
Description |
Operations for creating and interacting with sub-processes.
|
|
Synopsis |
|
|
|
Documentation |
|
newtype ProcessHandle |
|
|
data ProcessHandle__ |
A handle to a process, which can be used to wait for termination
of the process using waitForProcess.
None of the process-creation functions in this library wait for
termination: they all return a ProcessHandle which may be used
to wait for the process later.
| Constructors | |
|
|
type PHANDLE = CPid |
|
closePHANDLE :: PHANDLE -> IO () |
|
mkProcessHandle :: PHANDLE -> IO ProcessHandle |
|
withProcessHandle :: ProcessHandle -> (ProcessHandle__ -> IO (ProcessHandle__, a)) -> IO a |
|
withProcessHandle_ :: ProcessHandle -> (ProcessHandle__ -> IO ProcessHandle__) -> IO () |
|
runProcessPosix |
|
|
commandToProcess :: String -> IO (FilePath, [String]) |
Turns a shell command into a raw command. Usually this involves
wrapping it in an invocation of the shell.
There's a difference in the signature of commandToProcess between
the Windows and Unix versions. On Unix, exec takes a list of strings,
and we want to pass our command to binsh as a single argument.
On Windows, CreateProcess takes a single string for the command,
which is later decomposed by cmd.exe. In this case, we just want
to prepend "c:WINDOWSCMD.EXE /c" to our command line. The
command-line translation that we normally do for arguments on
Windows isn't required (or desirable) here.
|
|
withFilePathException :: FilePath -> IO a -> IO a |
|
withCEnvironment :: [(String, String)] -> (Ptr CString -> IO a) -> IO a |
|
Produced by Haddock version 2.2.2 |