projects
/
BearSSL
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SIGPIPE shall be ignored in most network-related cases.
[BearSSL]
/
tools
/
server.c
diff --git
a/tools/server.c
b/tools/server.c
index
71cfa5d
..
c6978cf
100644
(file)
--- a/
tools/server.c
+++ b/
tools/server.c
@@
-27,6
+27,7
@@
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/socket.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);
br_ssl_engine_set_buffer(&cc.eng, iobuf, iobuf_len, bidi);
+ /*
+ * We need to ignore SIGPIPE.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Open the server socket.
*/
/*
* Open the server socket.
*/