All KDE software built from source this morning on top of Fedora 34. STEPS TO REPRODUCE 1. Open Kate with a session 2. Open a new file 3. `killall kate` (which sends the SIGTERM signal) 4. Launch Kate again OBSERVED RESULT Kate opens with the set of tabs that does not include the file opened in step 2. Changed session data is lost. EXPECTED RESULT Kate saves any changed session data (including newly-opened files) when it receives a SIGTERM signal. IMPACT Anytime Kate gets quit automatically by the user shutting down or restarting the computer, any changed session data is not saves, causing it to be lost. This is very annoying if the set of files opened in tabs differs significantly at the moment kate is SIGKILL'ed from what it was when Kate was last launched.
(I mean SIGTERM'ed)
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/649
Git commit a8a9eb10f4e9159504fd4c58c87bc755114c5b15 by Waqar Ahmed. Committed on 02/03/2022 at 11:09. Pushed by waqar into branch 'master'. Handle SIGINT/SIGTERM to prevent accidental data loss (linux only) M +2 -0 kate/CMakeLists.txt M +16 -0 kate/main.cpp M +1 -0 shared/CMakeLists.txt A +101 -0 shared/signal_watcher.cpp [License: LGPL(v2.0+)] A +37 -0 shared/signal_watcher.h [License: LGPL(v2.0+)] https://invent.kde.org/utilities/kate/commit/a8a9eb10f4e9159504fd4c58c87bc755114c5b15
Thank you so much, Waqar!
Will be extended to KWrite in https://invent.kde.org/utilities/kate/-/merge_requests/651