[commit: packages/process] master: Document spawnProcess and spawnCommand (#2233) (0faf513)
git at git.haskell.org
git at git.haskell.org
Wed Nov 20 21:09:12 UTC 2013
Repository : ssh://git@git.haskell.org/process
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0faf513f7e3667246d40767d25d0871b49d95851/process
>---------------------------------------------------------------
commit 0faf513f7e3667246d40767d25d0871b49d95851
Author: Duncan Coutts <duncan at well-typed.com>
Date: Fri Nov 15 20:01:21 2013 +0000
Document spawnProcess and spawnCommand (#2233)
Authored-by: Duncan Coutts <duncan at well-typed.com>
Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>
>---------------------------------------------------------------
0faf513f7e3667246d40767d25d0871b49d95851
System/Process.hs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/System/Process.hs b/System/Process.hs
index 39c12c8..5581786 100644
--- a/System/Process.hs
+++ b/System/Process.hs
@@ -220,11 +220,18 @@ createProcess cp = do
-- ----------------------------------------------------------------------------
-- spawnProcess/spawnCommand
+-- | Creates a new process to run the specified raw command with the given
+-- arguments. It does not wait for the program to finish, but returns the
+-- 'ProcessHandle'.
+--
spawnProcess :: FilePath -> [String] -> IO ProcessHandle
spawnProcess cmd args = do
(_,_,_,p) <- createProcess_ "spawnProcess" (proc cmd args)
return p
+-- | Creates a new process to run the specified shell command.
+-- It does not wait for the program to finish, but returns the 'ProcessHandle'.
+--
spawnCommand :: String -> IO ProcessHandle
spawnCommand cmd = do
(_,_,_,p) <- createProcess_ "spawnCommand" (shell cmd)
More information about the ghc-commits
mailing list