aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.c b/main.c
index 567a441..4363592 100644
--- a/main.c
+++ b/main.c
@@ -31,7 +31,7 @@ void cleanup(void)
unlink(cleanup_socket);
}
-void sigint(int sig)
+void signal_handler(int sig)
{
cleanup();
exit(1);
@@ -46,7 +46,7 @@ void run_tests(void)
int main()
{
- run_tests();
+ //run_tests();
const char *socket_name = "socket";
int sockfd;
@@ -59,7 +59,8 @@ int main()
cleanup_socket = socket_name;
atexit(cleanup);
- signal(SIGINT, sigint);
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
sp_main(sockfd);
}