Feature #89
Improve detection of already running instances on Linux
| Status: | Closed | Start: | 11/16/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | Alguno | % Done: |
100% |
|
| Category: | NNTPGrab Core | |||
| Target version: | 0.8.0 | |||
| Votes: | 0 |
Description
At the moment there are some issues with NNTPGrab related to detection of already running instances.
- There is no logic at the moment which prevents running the Gtk frontend and the Qt frontend at the same time (except when the JSON-RPC plugin is enabled)
- There is a race condition possible when the NNTPGrab Server is started and the Gtk or Qt frontend is started before the NNTPGrab Server is fully operational
- When the Qt frontend is running and an attempt is done to open an NZB file from the desktop environment the Gtk frontend will always be started
Improvements in this area are already being done (as part of feature #81) but this is only limited to the Gtk frontend.
To fully resolve the issues mentioned above DBus needs to be used by all frontends (including the NNTPGrab Server) to make sure there's only one instance of NNTPGrab running and provide a frontend-independent method to open NZB files from the desktop environment
Associated revisions
- Rewritten the ipc_linux.c file to use GDbus instead of dbus-glib
- When the connection with DBus is lost, automatically try to reconnect
- Don't depend on a code generator anymore for the processing of the DBus XML file
- Now that nothing in NNTPGrab uses dbus-glib anymore, drop it's dependency. Closes #81
- Dropped the --disable-dbus configure flag as GDbus it part of a regular GLib installation
so it doesn't make sense anymore to have it as an optional feature
- Moved all IPC code to the nntpgrab_utils library so it can be used by all frontends
- Five new API functions got added to the nntpgrab_utils library because of this move:
nntpgrab_utils_test_is_frontend_already_running, nntpgrab_utils_register_frontend, nntpgrab_utils_unregister_frontend,
nntpgrab_utils_send_open_nzb_file_request and nntpgrab_utils_send_bring_to_front_request
- Improved detection of already running NNTPGrab instances on Linux in both the Gtk and Qt frontends
This solves the issues mentioned at feature #89. Closes #89
- Added various testcases for the IPC code
- Dropped the old test_dbus testcase as it was using dbus-glib
- Added support for the 'BringToFront' IPC method which can be used to have a running NNTPGrab process present itself
- Parse the command line arguments earlier in startup of the program when using the GTK3 frontend (GtkApplication)
History
#1 Updated by Alguno over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Applied in changeset r1907.
Snapshots can be found at the following URLs:
Win32: https://snapshots.nntpgrab.nl/win32/unstable-trunk/nntpgrab_trunk_snapshot_svn_r1907_setup.exe
Win64: https://snapshots.nntpgrab.nl/win64/unstable-trunk/nntpgrab_trunk_snapshot_svn_r1907_setup_x64.exe
Mac OS X: https://snapshots.nntpgrab.nl/osx/unstable-trunk/NNTPGrab_unstable_r1907.zip
Also available in: Atom PDF
NNTPGrab

