aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-runserver/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-runserver/main.c')
-rw-r--r--src/blogc-runserver/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/blogc-runserver/main.c b/src/blogc-runserver/main.c
index 3b6f2c2..6ac638d 100644
--- a/src/blogc-runserver/main.c
+++ b/src/blogc-runserver/main.c
@@ -44,10 +44,17 @@ print_usage(void)
}
+void sigint_handler(int sig) {
+ printf("\n");
+ exit(0);
+}
+
+
int
main(int argc, char **argv)
{
signal(SIGPIPE, SIG_IGN);
+ signal(SIGINT, sigint_handler);
int rv = 0;
char *host = NULL;