|
|
@ -298,6 +298,7 @@ int main (int argc, char *argv[]) |
|
|
|
memset(&action, 0, sizeof(action)); |
|
|
|
memset(&action, 0, sizeof(action)); |
|
|
|
action.sa_handler = int_handler; |
|
|
|
action.sa_handler = int_handler; |
|
|
|
sigaction(SIGINT, &action, NULL); |
|
|
|
sigaction(SIGINT, &action, NULL); |
|
|
|
|
|
|
|
sigaction(SIGUSR1, &action, NULL); |
|
|
|
|
|
|
|
|
|
|
|
/* Parse config file */ |
|
|
|
/* Parse config file */ |
|
|
|
parse_config_file(); |
|
|
|
parse_config_file(); |
|
|
@ -479,6 +480,9 @@ void int_handler (int signum) |
|
|
|
printf(yellow("Received interrupt signal, exiting gracefully...\n")); |
|
|
|
printf(yellow("Received interrupt signal, exiting gracefully...\n")); |
|
|
|
dead = 1; |
|
|
|
dead = 1; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case SIGUSR1: |
|
|
|
|
|
|
|
parse_config_file(); |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -725,6 +729,8 @@ void parse_config_file (void) |
|
|
|
if (!fd) |
|
|
|
if (!fd) |
|
|
|
die("Could not open any config files, check the log for more details"); |
|
|
|
die("Could not open any config files, check the log for more details"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hotkey_list_destroy(hotkey_list); |
|
|
|
while (exit_state >= 0) { |
|
|
|
while (exit_state >= 0) { |
|
|
|
int tmp = 0; |
|
|
|
int tmp = 0; |
|
|
|
memset(block, 0, BLOCK_SIZE + 1); |
|
|
|
memset(block, 0, BLOCK_SIZE + 1); |
|
|
|