#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
path = "/";
}
+ /*
+ * Ignore SIGPIPE to avoid crashing in case of abrupt socket close.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Open the socket to the target server.
*/
#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
}
port = argv[1];
+ /*
+ * Ignore SIGPIPE to avoid crashing in case of abrupt socket close.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Open the server socket.
*/
#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
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.
*/
#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
br_ssl_engine_set_buffer(&cc.eng, iobuf, iobuf_len, bidi);
+ /*
+ * We need to ignore SIGPIPE.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Open the server socket.
*/