mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-29 19:06:55 -05:00
Implement clean shutdown after receiving Unix signals, resolves #169
The database wasn't saved properly and lockfiles were not removed when receiving the signals SIGINT, SIGTERM, SIGQUIT or SIGHUP. This patch implements signal handling and performs a clean shutdown after receiving SIGINT SIGTERM or SIGQUIT and ignores SIGHUP. Since this uses POSIX syscalls for signal and socket handling, there is no Windows implementation at the moment.
This commit is contained in:
parent
72b81bf403
commit
198691182b
3 changed files with 83 additions and 3 deletions
|
|
@ -42,6 +42,7 @@ public:
|
|||
public Q_SLOTS:
|
||||
void openDatabase(const QString& fileName, const QString& pw = QString(),
|
||||
const QString& keyFile = QString());
|
||||
void appExit();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
|
|
@ -68,7 +69,6 @@ private Q_SLOTS:
|
|||
void applySettingsChanges();
|
||||
void trayIconTriggered(QSystemTrayIcon::ActivationReason reason);
|
||||
void toggleWindow();
|
||||
void appExit();
|
||||
void lockDatabasesAfterInactivity();
|
||||
void repairDatabase();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue