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
/
client.c
diff --git
a/tools/client.c
b/tools/client.c
index
2c2985f
..
552b7f9
100644
(file)
--- a/
tools/client.c
+++ b/
tools/client.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>
@@
-619,6
+620,11
@@
do_client(int argc, char *argv[])
br_ssl_engine_set_buffer(&cc.eng, iobuf, iobuf_len, bidi);
br_ssl_client_reset(&cc, sni, 0);
br_ssl_engine_set_buffer(&cc.eng, iobuf, iobuf_len, bidi);
br_ssl_client_reset(&cc, sni, 0);
+ /*
+ * We need to avoid SIGPIPE.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Connect to the peer.
*/
/*
* Connect to the peer.
*/