mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fix tabulation, remove long description (to be moved to documentation)
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
3539ee9be6
commit
078d76c6f3
2 changed files with 33 additions and 39 deletions
|
@ -55,15 +55,15 @@ void handle_signal(int sig)
|
|||
case SIGPIPE:
|
||||
LogPrint(eLogInfo, "SIGPIPE received");
|
||||
break;
|
||||
case SIGTSTP:
|
||||
LogPrint(eLogInfo, "Daemon: Got SIGTSTP, disconnecting from network...");
|
||||
i2p::transport::transports.SetOnline(false);
|
||||
break;
|
||||
case SIGCONT:
|
||||
LogPrint(eLogInfo, "Daemon: Got SIGCONT, restoring connection to network...");
|
||||
i2p::transport::transports.SetOnline(true);
|
||||
break;
|
||||
}
|
||||
case SIGTSTP:
|
||||
LogPrint(eLogInfo, "Daemon: Got SIGTSTP, disconnecting from network...");
|
||||
i2p::transport::transports.SetOnline(false);
|
||||
break;
|
||||
case SIGCONT:
|
||||
LogPrint(eLogInfo, "Daemon: Got SIGCONT, restoring connection to network...");
|
||||
i2p::transport::transports.SetOnline(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
namespace i2p
|
||||
|
@ -180,27 +180,27 @@ namespace i2p
|
|||
}
|
||||
gracefulShutdownInterval = 0; // not specified
|
||||
|
||||
// handle signal TSTP
|
||||
bool handleTSTP; i2p::config::GetOption("unix.handle_sigtstp", handleTSTP);
|
||||
// handle signal TSTP
|
||||
bool handleTSTP; i2p::config::GetOption("unix.handle_sigtstp", handleTSTP);
|
||||
|
||||
// Signal handler
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = handle_signal;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sigaction(SIGHUP, &sa, 0);
|
||||
sigaction(SIGUSR1, &sa, 0);
|
||||
sigaction(SIGABRT, &sa, 0);
|
||||
sigaction(SIGTERM, &sa, 0);
|
||||
sigaction(SIGINT, &sa, 0);
|
||||
sigaction(SIGPIPE, &sa, 0);
|
||||
if (handleTSTP)
|
||||
{
|
||||
sigaction(SIGTSTP, &sa, 0);
|
||||
sigaction(SIGCONT, &sa, 0);
|
||||
}
|
||||
// Signal handler
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = handle_signal;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sigaction(SIGHUP, &sa, 0);
|
||||
sigaction(SIGUSR1, &sa, 0);
|
||||
sigaction(SIGABRT, &sa, 0);
|
||||
sigaction(SIGTERM, &sa, 0);
|
||||
sigaction(SIGINT, &sa, 0);
|
||||
sigaction(SIGPIPE, &sa, 0);
|
||||
if (handleTSTP)
|
||||
{
|
||||
sigaction(SIGTSTP, &sa, 0);
|
||||
sigaction(SIGCONT, &sa, 0);
|
||||
}
|
||||
|
||||
return Daemon_Singleton::start();
|
||||
return Daemon_Singleton::start();
|
||||
}
|
||||
|
||||
bool DaemonLinux::stop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue