handle more signal

This commit is contained in:
wangyu
2017-08-04 18:35:51 +08:00
parent 9f0c2c6f35
commit acece0b329
4 changed files with 67 additions and 196 deletions

View File

@@ -203,11 +203,11 @@ int set_buf_size(int fd)
void myexit(int a)
{
if(enable_log_color)
puts(RESET);
printf("%s\n",RESET);
clear_iptables_rule();
exit(a);
}
void INThandler(int sig)
void signal_handler(int sig)
{
myexit(0);