1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

don't demonize

This commit is contained in:
orignal 2016-06-15 10:17:02 -04:00
parent b5723a6c18
commit ff38a3bbfe

View File

@ -3,20 +3,31 @@
#include <stdlib.h>
#include "../../Daemon.h"
class DaemonQT: public i2p::util::Daemon_Singleton
{
public:
static DaemonQT& Instance()
{
static DaemonQT instance;
return instance;
}
};
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
int ret = -1;
if (Daemon.init(argc, argv))
if (DaemonQT::Instance ().init(argc, argv))
{
if (Daemon.start())
if (DaemonQT::Instance ().start())
{
w.show();
ret = a.exec();
}
Daemon.stop();
DaemonQT::Instance ().stop();
}
return ret;