From c8aef321b425ab6bfbfc694f21476d77148bc9f8 Mon Sep 17 00:00:00 2001 From: jaketothepast Date: Thu, 9 Jan 2020 09:48:02 -0500 Subject: [PATCH] Sighup handler for reloading configuration file. --- main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index c62f98a..a6edf4f 100644 --- a/main.c +++ b/main.c @@ -39,6 +39,14 @@ void int_handler(int signal) { // This should be the final decrement to the config object. } +/** + * SIGHUP handler, will reload the configuration file. + * @param signal Signo passed by system. + */ +void hup_handler(int signal) { + +} + void replacehost(char *oldhost, char *newhost); /** @@ -139,10 +147,6 @@ void daemonize() { */ int main(int argc, char **argv) { - // Install a sigint handler to help us clean up. - linkedlist_add(&hosts, "hello.com"); - linkedlist_add(&hosts, "heloworld.com"); - linkedlist_print(hosts); signal(SIGINT, int_handler); if (getuid() != 0) {