
I am proposing a POSIX process group API change in order to (1) make ProcessGroupID a newtype of CPid, and (2) make it possible to query the process group of an existing process. The motivation is that currently there is no way to query a process group of an existing process, but it seems needed for a proper implementation for ticket #3994. Also it seems nice if the compiler can do distinguish ProcessGroupID from ProcessID, just like Fd from CInt. The full proposal is at the wiki page http://www.haskell.org/haskellwiki/POSIX_process_groups_reform_proposal . The patches and test cases are all attached in the ticket http://hackage.haskell.org/trac/ghc/ticket/5167 . For backward compatibility the current patches preserv the current implementation if possible. In contrast the proposal on the wiki suggests a more aggressive reformation. Thanks, Favonia PS: Sorry but the patch to the package base is not fully tested, as I have not figured out the correct way to compile package base (even without the patch). However the patch to the package unix should work independently of the patch to the package base.