-
Notifications
You must be signed in to change notification settings - Fork 231
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
Keyword shield doesn't work #2596
Comments
Yup, it seems that that doesn't work. Good catch. |
The interrupt mechanism in the interpreter is pretty complicated, so I doubt this will be easy to do for a volunteer. The relevant code is in |
If this is still available, I'd love to take a swing at it! |
I've assigned you, thanks for volunteering! |
Of course, thanks so much! |
Finally got to figuring out the issue here, my apologies for the delay! This is what I've been able to surmise is happening during e.g.
The "core" issue here seems to just be that the sleep concludes immediately when SIGINT is received. There's two possible fixes I thought of--if either of them seem useful, I can write them up real quick and share a PR:
Do either of these seem like a useful approach I should try implementing? |
(Wanted to quickly follow up on this, in case it's still relevant--would either of these solutions help?) |
Yes, I think it's definitely still relevant! I'm not sure which approach is better. Are |
I'll make a PR in that case! I'm not sure if there's any other similar issues with |
Wouldn't it be simpler to mask signals when shieldfun starts? Hopefully this will cover shielding calls to external libraries as well. |
That sounds like a better plan--will give that a shot :) |
By the way, this didn't work as early as version 1.5, released in 2012! |
The documentation claims:
Unless I'm misunderstanding the page, which doesn't include any examples,
shield
doesn't seem to be working:The text was updated successfully, but these errors were encountered: