mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
[daemon] add SIGTSTP, SIGCONT support on Unix
This commit is contained in:
parent
827a88d772
commit
5394b747a1
@ -24,6 +24,7 @@
|
|||||||
#include "Tunnel.h"
|
#include "Tunnel.h"
|
||||||
#include "RouterContext.h"
|
#include "RouterContext.h"
|
||||||
#include "ClientContext.h"
|
#include "ClientContext.h"
|
||||||
|
#include "Transports.h"
|
||||||
|
|
||||||
void handle_signal(int sig)
|
void handle_signal(int sig)
|
||||||
{
|
{
|
||||||
@ -54,7 +55,15 @@ void handle_signal(int sig)
|
|||||||
case SIGPIPE:
|
case SIGPIPE:
|
||||||
LogPrint(eLogInfo, "SIGPIPE received");
|
LogPrint(eLogInfo, "SIGPIPE received");
|
||||||
break;
|
break;
|
||||||
}
|
case SIGTSTP:
|
||||||
|
LogPrint(eLogInfo, "Daemon: Got SIGTSTP, disconnecting from network...");
|
||||||
|
i2p::transport::transports.SetOnline(false);
|
||||||
|
break;
|
||||||
|
case SIGCONT:
|
||||||
|
LogPrint(eLogInfo, "Daemon: Got SIGCONT, restore connection to network...");
|
||||||
|
i2p::transport::transports.SetOnline(true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
|
Loading…
x
Reference in New Issue
Block a user