Skip to content

Commit

Permalink
Ignore SIGPIPE.
Browse files Browse the repository at this point in the history
  • Loading branch information
dag-erling committed Nov 3, 2016
1 parent 5b1645e commit 6af21cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/kexkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <errno.h>
#include <netdb.h>
#include <poll.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -365,6 +366,8 @@ main(int argc, char *argv[])
if ((conns = calloc(maxconns, sizeof *conns)) == NULL)
err(1, "calloc()");

signal(SIGPIPE, SIG_IGN);

memset(&hints, 0, sizeof hints);
hints.ai_socktype = SOCK_STREAM;
if ((eai = getaddrinfo(host, service, &hints, &reslist)) != 0)
Expand Down

0 comments on commit 6af21cd

Please sign in to comment.