mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 15:39:27 -05:00
Gracefully handle signals in retroshare-android-service
This commit is contained in:
parent
8c21bfcd54
commit
ac9a8437fa
@ -20,6 +20,7 @@
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QTimer>
|
||||
#include <csignal>
|
||||
|
||||
#ifdef __ANDROID__
|
||||
# include "util/androiddebug.h"
|
||||
@ -38,6 +39,13 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
signal(SIGINT, &QCoreApplication::exit);
|
||||
signal(SIGTERM, &QCoreApplication::exit);
|
||||
#ifdef SIGBREAK
|
||||
signal(SIGBREAK, &QCoreApplication::exit);
|
||||
#endif // def SIGBREAK
|
||||
|
||||
ApiServer api;
|
||||
RsControlModule ctrl_mod(argc, argv, api.getStateTokenServer(), &api, true);
|
||||
api.addResourceHandler(
|
||||
|
Loading…
Reference in New Issue
Block a user