pitluga / subcontractor

rvm aware process launcher for foreman
85 stars 24 forks source link

subcontract processes not killed on ctrl+c #3

Closed masterkain closed 12 years ago

masterkain commented 12 years ago

Hello, I'm using the Slanger gem which spawns a thin process.

push: subcontract --rvm ruby-1.9.3-p0@push --chdir ../push --signal INT -- bundle exec slanger --app_key xxx --secret xxx

However when I hit CTRL+C all the other processes defined in the Procfile quits but this one. I also tried to send the default TERM or leaving out the parameter, but it makes no difference.

I haven't checked the code yet but it appears foreman is killing subcontract while leaving the subprocess alive.

pitluga commented 12 years ago

This was definitely a bug. It looks like slanger was spawning three levels of processes. Subcontractor would not find the 3rd child and that was the one that was not getting killed. I've updated the code to recursively search for children until no more are found, so it should be much more reliable. This fix is in version 0.3.1.

Thanks for raising the issue.

ghost commented 12 years ago

yes i hit this issue too. the map function not working on strings in ruby 1.9. does 0.3.1 work with ruby 1.9? is 0.3.1 stable? cheers - mark