-
Notifications
You must be signed in to change notification settings - Fork 42
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
Problem in the single-instance mode #184
Comments
@tsujan Thinking loud: Maybe |
@luis-pereira That's a good idea but needs a total overhaul. I'll think about it a little and tell you if I don't find a simple solution -- by "simple", I mean a few lines of code. |
@luis-pereira I couldn't find a short solution. The problem is that, with Would you implement a single-instance by using |
Hmm - if you don't like the current implementation, is it so hard to drop and use the method we use for other LXQt packages? |
It's isn't about my disliking it. It's simply wrong because the shared memory will be released only if the app runs first.
It's quite possible and should be done but needs a lot of work because the core should be rewritten. |
ok, in that case i understood you right and agree wholehearted 🙂 Edit: and to be honest - i would ignore it for now. |
It isn't a big issue -- try to run the app twice after |
It's a minor issue. Can wait. |
Let me explain the problem by describing how it can be reproduced.
Steps to Reproduce (for bugs)
screengrab --help
or evenscreengrab --fgf
and pressEnter
.Enter
.Then, screengrab won't start and this message will be shown: "QLocalSocket::connectToServer: Connection refused"
Context
The problem is caused by using
QSharedMemory
for creating a single-instance app. In 2,qipc_sharedmemory_blahblah
andqipc_systemsem_blahblah
are created in/tmp
but aren't removed immediately. In 3,qipc_sharedmemory
is removed at last but , because it existed in the first place, the app shows an error message and exits. Only after that, the app will start normally.Possible Solution
In FeatherPad, I used a lock file instead of
QSharedMemory
becauseQSharedMemory
proved to be unreliable and buggy. However, I didn't useQCommandLineParser
in FeatherPad (I don't like such tools, in general) and the code structure is very different.So, I don't know of a possible solution yet.
System Information
git LXQt.
The text was updated successfully, but these errors were encountered: