SIGPIPE shall be ignored in most network-related cases.

This commit is contained in:
Thomas Pornin 2016-11-20 16:23:00 +01:00
parent 7561e7d6c8
commit 3b044d4296
4 changed files with 24 additions and 0 deletions

View file

@ -27,6 +27,7 @@
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
@ -1010,6 +1011,11 @@ do_server(int argc, char *argv[])
br_ssl_engine_set_buffer(&cc.eng, iobuf, iobuf_len, bidi);
/*
* We need to ignore SIGPIPE.
*/
signal(SIGPIPE, SIG_IGN);
/*
* Open the server socket.
*/