-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Keyboard interrupt (SIGINT) during a shell.RunInteractiveShell call from a plugin stops the editor itself #2612
Comments
I spent some time trying to fix this and realized the issue stems from the sigterm handler defined in the main package: Line 352 in c8c7ad5
Making a new signal handler for I think the |
I think moving I do not how is the signal sent but I have created a branch in my fork but I realized it may not be good not posting a comment instead first, so I apologize. |
When we are saving a file with sudo, if we interrupt sudo via Ctrl-c, it doesn't just kill sudo, it kills micro itself. The cause is the same as in the issue zyedidia#2612 for RunInteractiveShell() which was fixed by zyedidia#3357. So fix it the same way as in zyedidia#3357.
Description of the problem or steps to reproduce
shell.RunInteractiveShell()
in~/.config/micro/plug/exectest/exectest.lua
:exec
)I would expect this to stop the interactive shell and return to the file I was editing. What happens instead is it kills the entire micro-editor process. It looks like this is also not what the code for
shell.RunInteractiveShell
was intended to do:micro/internal/shell/shell.go
Lines 103 to 111 in c8c7ad5
Version information
OS: Linux (OpenSUSE Tumbleweed)
Version: 0.0.0-unknown
Commit hash: c8c7ad5
Compiled on October 31, 2022
The text was updated successfully, but these errors were encountered: