-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
Shutting down via the window X (or any other signal) doesn't allow for clean exit #117
Comments
FTXUI insert itself as a signal handler, but does call back the previously defined signal handler at the end. So existing signal handler should continue to work without conflict with FTXUI. I need a signal handler, in order to properly cleanup the terminal state when existing FTXUI. Goal is not to let the user with unusable terminal. What would you like to see as API for FTXUI to help you with this? |
When SIGINT is intercepted, quit the run loop and raise the signal again. I am not sure this addresses: #117 Maybe?
When SIGINT is intercepted, quit the run loop and raise the signal again. I am not sure this addresses: #117 Maybe?
Hey @hippietim, I landed a few patches. Could you confirm your problem has been fixed or bring some suggestions? |
std::raise(0); causes an abort on Windows. This comes from the line: |
Microsoft Visual C++ Runtime LibraryDebug Assertion Failed! Program: Expression: ("Invalid signal or error", 0) For information on how your program can cause an assertion (Press Retry to debug the application) Abort Retry Ignore |
A bug has been introduced in: 478d7e8 I purposefully allowed raising the signal zero, because I thought this was doing nothing. See the response: https://stackoverflow.com/a/32260528/5112390 but this is different on Windows. See: #117
A bug has been introduced in: 478d7e8 I purposefully allowed raising the signal zero, because I thought this was doing nothing. See the response: https://stackoverflow.com/a/32260528/5112390 but this is different on Windows. See: #117
Thanks @MichaelGoulding ! This should be fixed now. |
The issue for us is that if we exit the process from the signal thread, we have no way of executing on the main thread again which is where we must do COM cleanup. |
When the framerwork enters the Loop, it tales over signal handlers. This would be fine if it handled them by alerting the main process loop to exit. Instead it calls some cleanup code and exits from the exception thread. We've got COM initialization and objects created on the main thread that we'd like to be able to cleanup.
The text was updated successfully, but these errors were encountered: