[Haskell-cafe] Question about terminateProcess

Brandon Allbery allbery.b at gmail.com
Sat Jun 20 02:17:01 UTC 2015


On Fri, Jun 19, 2015 at 10:00 PM, Niklas Hambüchen <mail at nh2.me> wrote:

> Note: on Windows, if the process was a shell command created by
> createProcess with shell, or created by runCommand or
> runInteractiveCommand, then terminateProcess will only terminate the
> shell, not the command itself. On Unix systems, both processes are in a
> process group and will be terminated together.
>

Last I checked, that was just wrong on Unix; it kills only the shell. This
is probably because someone did not consider that most modern shells
support job control, and therefore start commands in their own independent
process groups. (Or assumed that this does not happen with "sh -c"; I would
have to test specific shells --- and versions! various bash versions can
behave quite differently and often have bugs lurking in the dark corners
--- to see if this applies.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150619/7ac07ef8/attachment.html>


More information about the Haskell-Cafe mailing list