From e37c7be93e131e8f73b96e5b761a983b36efc420 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 8 May 2020 15:17:47 -0700 Subject: Fix handling of remote disconnects --- util.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util.c') diff --git a/util.c b/util.c index 4962b52..1c55e09 100644 --- a/util.c +++ b/util.c @@ -726,9 +726,14 @@ int socket_error_is_wouldblock(void) #else #include +#include void socket_init(void) { + //SIGPIPE on network sockets is not desired + //would be better to do this in a more limited way, + //but the alternatives are not portable + signal(SIGPIPE, SIG_IGN); } int socket_blocking(int sock, int should_block) -- cgit v1.2.3