<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 19, 2015 at 10:17 PM, Brandon Allbery <span dir="ltr"><<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> 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.</blockquote></div><br>FWIW dash as shipped on Mint 17 and bash 4.3.11(1) do not create a new pgrp with sh -c, at least by default. I think you can turn job control on even in noninteractive bash if you try hard enough, though.</div><div class="gmail_extra"><br></div><div class="gmail_extra">  bash -c 'echo shell=$$; perl -le "print qq{perl=\$\$}; print qq{pgrp=}, getpgrp(0)"'<br><div><br></div><div>Replace "bash" with "sh" or other specific shell you want to test; if the "pgrp" is the same as the "perl" then the shell is doing job control, if it's the same as "shell" then it is not and (at least in theory) create_group + terminateProcess should work.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>