GNOME Bugzilla – Bug 771816
GParted never exits if the main window is closed before the initial device load completes
Last modified: 2016-10-19 16:23:45 UTC
If the GParted main window is closed before the initial device load completed gpartedbin never exits. The main window closes but the process sits there idle forever. Subsequently running gparted reports this error: # gparted The process gpartedbin is already running. Only one gpartedbin process is permitted. If the user is running GParted from a desktop menu they will never see this error so they will never know why GParted won't start any more.
Created attachment 336065 [details] [review] Make gpartedbin exit when closed before the initial load completes (v1) Hi Curtis, I've been wondering how to fix this for several years now. Finally found the solution. We should probably also kill any running set_devices_thread so GParted can exit immediately when the main window is closed. However I'll leave that for another time. Thanks, Mike
Created attachment 336154 [details] [review] Make GParted exit when closed before the initial load completes (v2) Hi Curtis, Here's patch v2. Only trivial changes: 1) Minor code comment update. 2) Remove underscore from the start of function name _initial_device_refresh(). Using underscore was a pattern used in PipeCapture.h, but when there were two functions with the same name. Not the case this time. Thanks, Mike
Hi Mike, Good investigative work on this gpartedbin non-exiting issue. My testing with patch v2 from comment #2 has gone well. I successfully tested on kubuntu 16.04 and found no regressions on the following distros: debian 7 fedora 23 openSUSE 42.1 ubuntu 14.04 Patch v2 has been committed to the git repository for inclusion in the next release of GParted. The relevant git commit can be viewed at the following link: Make GParted exit when closed before the initial load completes (#771816) https://git.gnome.org/browse/gparted/commit/?id=7ea22f1190eb22fb50ca6829be1d6b30ace2fb46 Curtis
Created attachment 337348 [details] [review] Fix slighly messed up comment Hi Curtis, Here's a fix for the slightly messed up comment I made in the patch v2 above :-(. Thanks, Mike
Update comment patch from comment #4 applied to the git master. :-) The relevant git commit can be viewed at the following link: Fix slightly messed up comment in Win_GParted::on_show() (#771816) https://git.gnome.org/browse/gparted/commit/?id=6bacd6ae4d210f3c5eb11f473ec163d20f0e8cdb
This enhancement was included in the GParted 0.27.0 release on October 19, 2016.