|
|
@ -21,10 +21,13 @@ void handle_signal(int sig) |
|
|
|
switch (sig) |
|
|
|
switch (sig) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case SIGHUP: |
|
|
|
case SIGHUP: |
|
|
|
LogPrint(eLogInfo, "Daemon: Got SIGHUP, reopening logs and tunnel configuration..."); |
|
|
|
LogPrint(eLogInfo, "Daemon: Got SIGHUP, reopening tunnel configuration..."); |
|
|
|
i2p::log::Logger().Reopen (); |
|
|
|
|
|
|
|
i2p::client::context.ReloadConfig(); |
|
|
|
i2p::client::context.ReloadConfig(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case SIGUSR1: |
|
|
|
|
|
|
|
LogPrint(eLogInfo, "Daemon: Got SIGUSR1, reopening logs..."); |
|
|
|
|
|
|
|
i2p::log::Logger().Reopen (); |
|
|
|
|
|
|
|
break; |
|
|
|
case SIGINT: |
|
|
|
case SIGINT: |
|
|
|
if (i2p::context.AcceptsTunnels () && !Daemon.gracefulShutdownInterval) |
|
|
|
if (i2p::context.AcceptsTunnels () && !Daemon.gracefulShutdownInterval) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -153,6 +156,7 @@ namespace i2p |
|
|
|
sigemptyset(&sa.sa_mask); |
|
|
|
sigemptyset(&sa.sa_mask); |
|
|
|
sa.sa_flags = SA_RESTART; |
|
|
|
sa.sa_flags = SA_RESTART; |
|
|
|
sigaction(SIGHUP, &sa, 0); |
|
|
|
sigaction(SIGHUP, &sa, 0); |
|
|
|
|
|
|
|
sigaction(SIGUSR1, &sa, 0); |
|
|
|
sigaction(SIGABRT, &sa, 0); |
|
|
|
sigaction(SIGABRT, &sa, 0); |
|
|
|
sigaction(SIGTERM, &sa, 0); |
|
|
|
sigaction(SIGTERM, &sa, 0); |
|
|
|
sigaction(SIGINT, &sa, 0); |
|
|
|
sigaction(SIGINT, &sa, 0); |
|
|
|