Run processes in new pgroup
Some processes are getting orphaned when running Foreman with JRuby. Creating a new pgroup allows them all to be killed together.
I believe the issue is related to how JRuby handles Dir.chdir by
creating a shell process: sh -c 'cd /chdir/target; ${command}'. That
causes a second process to be created that won't get cleaned up by
killing the parent.
This PR is needed for rerun to work with foreman on Ubuntu.
This PR is needed for
rerunto work with foreman on Ubuntu.
I think there's a new version here: https://github.com/ddollar/foreman/pull/780
@davishmcclurg Yes, that was actually the branch I tested with.
I forked foreman and merged #780 (this PR but rebased) and released the fork as overman: https://github.com/spinels/overman, https://rubygems.org/gems/overman, #780 (comment)