foreman icon indicating copy to clipboard operation
foreman copied to clipboard

Run processes in new pgroup

Open davishmcclurg opened this issue 7 years ago • 4 comments

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.

davishmcclurg avatar Oct 30 '18 19:10 davishmcclurg

This PR is needed for rerun to work with foreman on Ubuntu.

baelter avatar Dec 22 '21 13:12 baelter

This PR is needed for rerun to work with foreman on Ubuntu.

I think there's a new version here: https://github.com/ddollar/foreman/pull/780

davishmcclurg avatar Dec 22 '21 20:12 davishmcclurg

@davishmcclurg Yes, that was actually the branch I tested with.

baelter avatar Dec 27 '21 09:12 baelter

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)

dentarg avatar Oct 28 '22 16:10 dentarg