https://bugs.kde.org/show_bug.cgi?id=377814
Bug ID: 377814 Summary: KDBusService design inconvenient for Unique apps Product: frameworks-kdbusaddons Version: 5.31.0 Platform: Kubuntu Packages OS: Linux Status: UNCONFIRMED Severity: wishlist Priority: NOR Component: general Assignee: fa...@kde.org Reporter: trufano...@gmail.com CC: kdelibs-b...@kde.org Target Milestone: --- I've played with KDBusService and got quite frustrated with its behavior. I have to look into its code to make it more clear for myself. It seems to not designed for Unique applications (where only one instance allowed) usage. 1. It uses exit() to terminate application if there is an instance already running. I would add a couple of notes into documentation regarding `exit` side effects as described here: http://stackoverflow.com/a/461528/841424 2. There is inconsistency in `activateRequested` signal. It was quite surprisingly to find that it passes empty arguments to signal if second instance was called without command line parameters. This better to be documented. 3. It ignores `setExitValue()` in case second instance was called without command line parameters. In this case second app will always exit with `exit(0)`. This better to be documented. 4. There is no reliable way to communicate the reason of exit of second instance to user. For example if I launch a demon and forget about it or it hangs. Then I launch secondary instance and it just exits. Sometimes with 0 exit value. And no chance to inform about reason. I think there should be a second signal that emitted in duplicate processes just before `exit()` call to let them do something like `cerr << "Error: Only one instance of application may be launched." and specify exit value by themselves. -- You are receiving this mail because: You are watching all bug changes.