mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Adding receiver stop action triggered by the SIGHUP signal
This commit is contained in:
parent
559e570cbc
commit
3474c9d8ac
@ -88,8 +88,8 @@ ControlThread *ControlThread::me = nullptr;
|
||||
*/
|
||||
void ControlThread::handle_signal(int sig)
|
||||
{
|
||||
DLOG(INFO) << "GNSS-SDR received " << sig << " OS signal";
|
||||
if (sig == SIGINT || sig == SIGTERM)
|
||||
LOG(INFO) << "GNSS-SDR received " << sig << " OS signal";
|
||||
if (sig == SIGINT || sig == SIGTERM || sig == SIGHUP)
|
||||
{
|
||||
std::cout << "Stopping GNSS-SDR via SIGINT or SIGTERM...\n";
|
||||
|
||||
@ -99,15 +99,9 @@ void ControlThread::handle_signal(int sig)
|
||||
/* Reset signal handling to default behavior */
|
||||
if (sig == SIGINT) signal(SIGINT, SIG_DFL);
|
||||
}
|
||||
else if (sig == SIGHUP)
|
||||
{
|
||||
std::cout << "Debug: received SIGHUP signal\n";
|
||||
// std::cout << "Debug: reloading daemon config file ...\n";
|
||||
// todo
|
||||
}
|
||||
else if (sig == SIGCHLD)
|
||||
{
|
||||
std::cout << "Debug: received SIGCHLD signal\n";
|
||||
LOG(INFO) << "received SIGCHLD signal";
|
||||
// todo
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user