On 18.08.2015 13:19, intrigeri wrote: > Hi, > KeePassX doesn't setup any signal handlers so sending SIGINT or SIGTERM > will just kill it. > Is there any reason why, or is it a simple matter of programming + > someone finding time to add these signal handlers? > >> However it does react to requests from the X session manager. >> It ask whether to save changes, remove the lock file etc. >> Tested on KDE and Gnome 3. > Good to know. So I see 3 options: > > a) KeePassX upstream adds a handler for SIGTERM, so that every > standard way of closing the application work as reliably as the > already supported ones. > b) We modify Tails to close the GNOME session with standard X session > manager mechanisms. > c) We modify Tails to send the relevant X session manager request to > KeePassX upon shutdown. > > I suspect that (a) would be pretty simple to implement for anyone > who's at ease with C++, and would benefit more users than (b) and (c). > Now, nobody is interested in implementing (a), then we'll have to go > the (b) or (c) way, and this bug could be tagged wontfix or downgraded > to wishlist.
Implementing (a) is not trivial but certainly doable: http://doc.qt.io/qt-4.8/unix-signals.html However the real issue is that you can't ask the user if unsaved changes should be saved to disk if you terminate the X server underneath KeePassX. The only thing KeePassX can do is clean up the lock file but that seems like a minor issue compared to loosing passwords. This isn't KeePassX specific so I think you should look into (b). Cheers, Felix

