-
-
Notifications
You must be signed in to change notification settings - Fork 2k
bundle exec signal trapping regression from v1.11.2 to v1.12.0 #4568
Comments
Can you verify this is still happening with 1.12.3? |
Yes, it is still happening with 1.12.3. I just wanted to point out that the regression came with 1.12 series. I haven't bothered trying the rc and pre releases though. $ bundle --version
Bundler version 1.12.3
$ bundle exec puma
Puma starting in single mode...
* Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://0.0.0.0:9292
Use Ctrl-C to stop
^C$ echo $?
1 |
So walking through the released version I have found that:
|
Working on this. I'll have a proposed fix soon. |
This is due to the new use of load inside bundle exec. |
Yep. I did some digging and I initially thought that it's because Doing a I suspect that Puma might do some Thread stuff that triggers this edge-case but haven't yet found the end of the rabbit-hole :) |
Yes, I wanted to have that simple case example first but also didn't manage to reproduce it with a simple trap. That is why I ended up with |
I too tried to reproduce it. I went a bit into the puma code and found that it doesn't set a signal trap for catching Interrupt for I have abstracted out the model into a small script and the same behavior can be observed. |
@asutoshpalai Nice explanation, thanks for the digging. @segiddins I think we should preserve the old behavior by resetting the signal handlers manually (since If we want to move forward with the manual reset, I have a fix ready and will wrap up @asutoshpalai's code in a test case and we'll be good to go. |
@agis- I guess we'll just have to restore the old interrupt handler from before bundler installed its when running exec? |
@segiddins I was thinking something like this: https://github.com/agis-/bundler/commit/dcc05d2585d339adeea3efd0cca6654cb246f212. I still have to figure out a way to test this. |
Oh, if setting it to default works, we should should wipe out every possible signal handler |
@segiddins AFAICT we only trap |
But that might change ;) |
@agis- happy to help I attempted at writing a spec for it, it at asutoshpalai 5368aa1. I hope that helps. It is failing the Edit: Wrong commit link |
Sorry, the spec fails without |
@asutoshpalai what's the status on this issue? |
I shall try to make a PR today 🎯 |
Fixes INT signal for ruby executables Fixes #4568
There seems to be a regression between bundler version 1.11.2 and 1.12.0 (also the latest version).
Easy way to reproduce:
Gemfile:
config.ru:
Working scenario:
Not working scenario:
The text was updated successfully, but these errors were encountered: