projects
/
BearSSL
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some more Doxygen API documentation (X.509 processing).
[BearSSL]
/
samples
/
client_basic.c
diff --git
a/samples/client_basic.c
b/samples/client_basic.c
index
d4f79fb
..
1609f43
100644
(file)
--- a/
samples/client_basic.c
+++ b/
samples/client_basic.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>
@@
-260,6
+261,11
@@
main(int argc, char *argv[])
path = "/";
}
path = "/";
}
+ /*
+ * Ignore SIGPIPE to avoid crashing in case of abrupt socket close.
+ */
+ signal(SIGPIPE, SIG_IGN);
+
/*
* Open the socket to the target server.
*/
/*
* Open the socket to the target server.
*/