mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
graceful shutdown by SIGINT
This commit is contained in:
parent
25dbf62274
commit
db88183a23
2 changed files with 39 additions and 21 deletions
31
Daemon.h
31
Daemon.h
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue