-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Albert is not quit gracefully #197
Comments
* Human readanble serialization files * Instantly serialization (realated to #197) * Pimpl websearch * Merge model and extensions (Synchronizing split classes is complicated) * Use a QIcon cache since resizing the window may lag when creating the QIcons in place.
Afaik this is completely worked around now. Reopen if this is still an issue. |
Why do think it does not work? |
the |
zsh? did you run a never ending script? |
I don't know where it comes from yet. |
But you are using zsh, arent you? Because albert does not. So you run something in a terminal I guess. |
I've got some hints. Give me some time pls. |
Ok, the terminal-plugin causes this. It's simply because Some things to note:
|
If the process timed out the stdoutput is invalid. No need to handle it. #416
Need more info.
Because in non-interactive mode the aliases are not sourced.
Depends on the user. But I agree that its weird to use them
Damn, good reason to drop them . |
Actually, that would be a trivial regex-adaption.
aliases are super to use on commandline, you can do really hot shit with it. But aliases are not commands. Actually I don't care, if the aliases are loaded in the terminal plugin or not. My objection is, that it's just hazardous opening a noninteractive shell in interactive mode. My bashrc/zshrc checks before loading special things (decryption of ssh-keys, etc...) if the shell is called in interactive/noninteractive mode. And it behaves bad, if it's called in interactive mode, bot nobody is interacting with it. Many advanced shell-users do this.
Enhancing src/plugins/terminal/src/main.cpp ~L186 to:
Albert still would not process the signals sent via keyboard (e.g. |
already done, waits to be pushed
Weeeell, you're right.
TERM is the nice way, try kill.
Try to print something here. Is the signal received at all? |
does not work either. qprocess has there some quirks. I don't see in the docs how to reap the process after waitForFinished() fails.
The signal does not arrive in the shutdownHandler. |
there we are :D #419 |
New issue for the same topic: #1333 |
This is a major problem and the base for a whole lot of other issues (most prominent: settings not saved, data not serialized). It appears most likely when the user does not manually close albert and the session manager or systemd does it on shutdown, logout etc.
When I am talking of a graceful shutdown, I mean that the appplication was instructed to leave the eventloop and had enough time to call all destrcutors. There are some situations where a not graceful shutdown is unavoidable. E.g. when albert is terminatied by SIGKILL.
Currently albert is quit by a X close event or the unix signals SIGTERM, SIGHUP, SIGINT. The problem is that under some circumstances, it seems that the app is closed by other events too. I found out, that there are at least two problems. In setups without session managers (i3, openbox) Qt decides to just exit(1), because the X connection is lost. In sessions having a session manager (cinnamon, xfce) Qt decides to just exit(1), because the ICE/XSMP connection is lost.
gnome-session
is the only session-manager that somehow achieved a proper shutdown.My current plan in to save settings instantly and, well, extension have to implement some basic journalling or to trust to luck. These are just hacks. I dont know of a reliable way to do it properly. I'd really appreciate if some unix/linux gurus could help me with that.
Approaches that can not fix the problems cause:
QCoreApplication::aboutToQuit
orQGuiApplication::commitDataRequest
. The points when these signals would be emitted are not reached when exit(1) is called.std::atexit
is not supported, as many Qt global statics have already been destroyed by the point thatatexit
is run.I will keep this thread clean to not chase clever but lazy people off 😄 Thanks for the help so far.
The text was updated successfully, but these errors were encountered: