-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SharedHelpers.trap
assumes the prior handler for the signal is callable
#4764
Labels
Comments
Thanks for the report. Can you send us a patch? |
haines
added a commit
to haines/rubygems
that referenced
this issue
Jul 15, 2021
SharedHelpers.trap failed when the previous handler for a signal is not callable (for example, when it is the string "DEFAULT"). Instead, we now handle interrupts by aborting the process when worker threads are running, and restore the previous handler after worker threads are finished. Fixes rubygems#4764.
haines
added a commit
to haines/rubygems
that referenced
this issue
Jul 15, 2021
The existing interrupt handling using `SharedHelpers.trap` fails when the previous handler for a signal is not callable (for example, when it is the string "DEFAULT"). Instead, we now handle interrupts by aborting the process when worker threads are running, and restore the previous handler after worker threads are finished. Fixes rubygems#4764.
4 tasks
haines
added a commit
to haines/rubygems
that referenced
this issue
Jul 15, 2021
The existing interrupt handling using `SharedHelpers.trap` fails when the previous handler for a signal is not callable (for example, when it is the string "DEFAULT"). Instead, we now handle interrupts by aborting the process when worker threads are running, and restore the previous handler after worker threads are finished. Fixes rubygems#4764.
haines
added a commit
to haines/rubygems
that referenced
this issue
Jul 15, 2021
The existing interrupt handling using `SharedHelpers.trap` fails when the previous handler for a signal is not callable (for example, when it is the string "DEFAULT"). Instead, we now handle interrupts by aborting the process when worker threads are running, and restore the previous handler after worker threads are finished. Fixes rubygems#4764.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the problem as clearly as you can
SharedHelpers.trap
attempts to preserve any existing handler for a signal by invokingcall
on it.rubygems/bundler/lib/bundler/shared_helpers.rb
Lines 148 to 153 in e7bf6b4
However,
prior
can be a string, resulting inPost steps to reproduce the problem
Run this script:
Which command did you run?
bundler/inline
What were you expecting to happen?
I get the standard Ruby
Interrupt
exception when I interrupt the scriptWhat actually happened?
If Bundler installed any gems, I get
NoMethodError
. If Bundler did not install any gems (and therefore did not trap SIGINT) then I get the correctInterrupt
.If not included with the output of your command, run
bundle env
and paste the output belowThe text was updated successfully, but these errors were encountered: