[Haskell-cafe] Question about terminateProcess
Brandon Allbery
allbery.b at gmail.com
Sat Jun 20 02:24:43 UTC 2015
On Fri, Jun 19, 2015 at 10:17 PM, Brandon Allbery <allbery.b at gmail.com>
wrote:
> 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.
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.
bash -c 'echo shell=$$; perl -le "print qq{perl=\$\$}; print qq{pgrp=},
getpgrp(0)"'
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.
--
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/3f240d48/attachment.html>
More information about the Haskell-Cafe
mailing list