#3994: Add support for creating and interrupting process groups
----------------------------------+-----------------------------------------
Reporter: hamish | Owner: simonmar
Type: feature request | Status: patch
Priority: high | Milestone: 7.2.1
Component: libraries/process | Version: 6.12.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
----------------------------------+-----------------------------------------
Comment(by hamish):
interruptProcessGroupOf and create_group sound good. I'm not to fussed
about what goes on in System.Posix.Process (as you said it is kind of off
topic for this change).
Are there any situations you would want to interrupt your own process
group without blocking signals?
I am happy to change or remove the suffix. How is this problem normally
handled? If a user of say ghc 6.12.3 upgrades process are they expected
to upgrade everything that uses the old process package?
The patch already has this in the header runProcess.h ...
{{{
#define RUN_PROCESS_IN_CLOSE_FDS 0x1
#define RUN_PROCESS_IN_NEW_GROUP 0x2
}}}
We should move these to a simpler header (processFlags.h or something) so
it can be included in both runProcess.h and Internals.hs.
I did try with getProcessID first, but I could not make it work. MSDN
says
> The handle must have the PROCESS_QUERY_INFORMATION or
PROCESS_QUERY_LIMITED_INFORMATION access right.
but then it also says
> The handle returned by the CreateProcess function has PROCESS_ALL_ACCESS
access to the process object.
Suspension would be cool, but should we make that another issue? I am not
convinced it will be easy to do this on Win32 (I would be happy to proved
other wrong with some sample code though).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3994#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs