-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
feat: Gracefully exit on Signals #327
Conversation
Best reviewed: commit by commit
Optimal code review plan (1 warning)
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I have left the handing signal with a comment on what should be expected behaviour or what could be better than this as per your wish. I have ported the changes to appwindow and other helper API from #268 into this. I also confirm that now, I am able to exit gracefully (with hot exit enabled) and that this library works fine on my windows. |
Now it doesn't catch SIGHUP, which is sent on Linux when closing the terminal where the application was started 🤔. However, I saw SIGHUP in And, without this: Line 255 in 68140a7
, the application won't be killed after receiving SIGTERM during the progress dialog. |
Please test the latest commit first. |
It still works on my Windows but when Hotexit is not enabled If it will pop open the I have not still ran this commit, will confirm this behaviour in 5-6 hours, I tested locally by putting exact code as you have for signal handling now, (copy pasted old handling code) and found this behaviour during development of this PR |
I think this is useful on Linux. SIGINT is the same as a normal close, so the user can use Ctrl+C to normally close it. It is strange that the dialog is also showed when it's killed from the Windows task manager, maybe we can treat SIGINT as SIGTERM on Windows. |
I just noticed that d5ea61b has been not working since the new preferences window, because now the settings are saved when normally exiting. After this PR is finished and merged, the feature introduced by that commit will be more useless, so instead of making it work again, we can simply remove it. |
What behaviour you want when SIGTERM and SIGINT is invoked in Windows( from git bash)? I will try to fix it tell me behaviour with Hotexit and without Hotexit?
You work on behaviour for UNIX. |
Because SIGINT is sent when killing from the task manager on Windows, it's better to force-close when receiving SIGINT on Windows.
In this PR #327, started freeing of stack memory and caused runtime error during destruction.
* fix(EditorThemes): Invalid free/delete In this PR #327, started freeing of stack memory and caused runtime error during destruction. * style: Format codes (#355) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Description
Adds Signal handler with help of QCtrlControl
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate)
Type of changes
Checklist
.clang-format
file in the root directory to format my codes.git reset
and commit again, or usegit rebase -i
andgit commit --amend
to modify the commit messages.)