diff options
Diffstat (limited to 'src/blogc-runserver/main.c')
-rw-r--r-- | src/blogc-runserver/main.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/blogc-runserver/main.c b/src/blogc-runserver/main.c index 1b2df26..dc5a591 100644 --- a/src/blogc-runserver/main.c +++ b/src/blogc-runserver/main.c @@ -45,17 +45,14 @@ 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); + struct sigaction new_action; + new_action.sa_handler = SIG_IGN; + sigemptyset(&new_action.sa_mask); + new_action.sa_flags = 0; + sigaction(SIGPIPE, &new_action, NULL); int rv = 0; char *host = NULL; |