diff options
author | Michael Pavone <pavone@retrodev.com> | 2020-05-08 15:17:47 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2020-05-08 15:17:47 -0700 |
commit | e37c7be93e131e8f73b96e5b761a983b36efc420 (patch) | |
tree | 5a45643c122ae81c2020f24a6e385c70c290e586 /util.c | |
parent | 4bc8dcfd59d3cf49190883fb13d238d2929b11fe (diff) |
Fix handling of remote disconnects
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) |