[Haskell-cafe] How to terminate the process group of a processcreated with createProcess?

Donn Cave donn at avvanta.com
Wed Jan 11 23:08:44 CET 2012


Quoth Brandon Allbery <allbery.b at gmail.com>,
...
> terminateProcess passes on the semantics of kill(2); on SVID-compliant (and
> I think POSIX.1-compliant) systems, the negative of the process group
> leader's process ID is used to signal the process group.  Note that you may
> need to arrange for your initial child process to invoke setpgrp() to
> insure that the parent program is not part of the process group.

... and that stuff can be found in System.Posix.Process.  Support for
POSIX killpg can be found in System.Posix.Signals, by the way in case
you think that would make your intention more transparent.

> However I'm unclear as to the situation you are encountering, as your
> example does not appear to be spawning an intermediate process.

I missed that at first myself -- he actually invokes "time sleep 60".

	Donn



More information about the Haskell-Cafe mailing list