summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 5 insertions, 0 deletions
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 <fcntl.h>
+#include <signal.h>
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)