On Fri, Jun 19, 2015 at 10:00 PM, Niklas Hambüchen <mail@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@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net