Skip to content
Snippets Groups Projects
Commit b0c255f8 authored by dnsadmin's avatar dnsadmin
Browse files

Úgy tűnik nincs szükség signal kezelésre (#2)

parent 9b06679d
Branches
No related tags found
No related merge requests found
......@@ -26,7 +26,6 @@
logger log_on_demand;
bool verbose = false;
void kill_handler(int);
void print_help();
int main(int argc, char *argv[])
......@@ -118,17 +117,6 @@ int main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
struct sigaction killer;
sigemptyset(&killer.sa_mask);
killer.sa_flags = 0;
killer.sa_handler = kill_handler;
killer.sa_restorer = NULL;
if(sigaction(SIGTERM, &killer, NULL) < 0)
{
PERROR_ON_DEMAND("sigaction");
exit(EXIT_FAILURE);
}
// --------------- INIT ---------------------
dns_server server;
try
......@@ -195,8 +183,3 @@ Options:
-h help
)");
}
void kill_handler(int x) {
log_on_demand(LOG_INFO, "SIGTERM received");
exit(EXIT_SUCCESS);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment