graceful shutdown by SIGINT

This commit is contained in:
orignal 2016-03-29 12:34:53 -04:00
parent 25dbf62274
commit db88183a23
2 changed files with 39 additions and 21 deletions

View file

@ -50,26 +50,31 @@ namespace i2p
bool init(int argc, char* argv[]);
bool start();
bool stop();
bool stop();
void run ();
};
#else
class DaemonLinux : public Daemon_Singleton
{
public:
static DaemonLinux& Instance()
{
static DaemonLinux instance;
return instance;
}
public:
static DaemonLinux& Instance()
{
static DaemonLinux instance;
return instance;
}
bool start();
bool stop();
; void run ();
bool start();
bool stop();
void run ();
private:
std::string pidfile;
int pidFH;
private:
std::string pidfile;
int pidFH;
public:
int gracefullShutdownInterval; // in seconds
};
#endif