Repository : ssh://darcs.haskell.org//srv/darcs/packages/unix

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/5f3e4b478e1b84a23086f04c97a8fd6ea258de2e

>---------------------------------------------------------------

commit 5f3e4b478e1b84a23086f04c97a8fd6ea258de2e
Author: Favonia <[email protected]>
Date:   Tue May 24 18:47:35 2011 -0400

    Fix typos in future process group API

>---------------------------------------------------------------

 System/Posix/Process.hsc |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/System/Posix/Process.hsc b/System/Posix/Process.hsc
index d97b81a..5b91b41 100644
--- a/System/Posix/Process.hsc
+++ b/System/Posix/Process.hsc
@@ -139,9 +139,10 @@ foreign import ccall unsafe "getpgid"
 -- | 'createProcessGroup' calls @setpgid(0,0)@ to make
 --   the current process a new process group leader.
 createProcessGroup :: IO ProcessGroupID
-createProcessGroup pid = do
-  throwErrnoIfMinus1_ "createProcessGroupFor" (c_setpgid 0 0)
-  return pid
+createProcessGroup = do
+  throwErrnoIfMinus1_ "createProcessGroup" (c_setpgid 0 0)
+  pgid <- getProcessGroupID
+  return pgid
 -}
 
 -- | @'createProcessGroupFor' pid@ calls @setpgid@ to make
@@ -164,8 +165,8 @@ joinProcessGroup pgid =
 -- | @'setProcessGroupID' pgid@ calls @setpgid@ to set the
 --   'ProcessGroupID' of the current process to @pgid@.
 setProcessGroupID :: ProcessGroupID -> IO ()
-setProcessGroupID pid pgid =
-  throwErrnoIfMinus1_ "setProcessGroupIDOf" (c_setpgid pid pgid)
+setProcessGroupID pgid =
+  throwErrnoIfMinus1_ "setProcessGroupID" (c_setpgid 0 pgid)
 -}
 
 -- | @'setProcessGroupIDOf' pid pgid@ calls @setpgid@ to set the



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to