Fix SIGPIPE causing unexpected exit of example applications

examples/client.c:
examples/coap-rd.c:
examples/coap-server.c:
examples/etsi_iot_01.c:
examples/tiny.c:

Make the applications ignore SIGPIPE.

examples/coap-rd.c:

Support clean exit for SIGTERM / SIGQUIT for valgrind testing.
This commit is contained in:
Jon Shallow committed 2019-08-29 12:58:15 +01:00
1 parent 16b77c3e6c
commit 003b64ab3f
5 files changed
+35 -1

No files matched your search

+3
View File
@@ -148,6 +148,9 @@ main(int argc, char **argv) {
sa.sa_flags = 0;
sigaction (SIGINT, &sa, NULL);
sigaction (SIGTERM, &sa, NULL);
/* So we do not exit on a SIGPIPE */
sa.sa_handler = SIG_IGN;
sigaction (SIGPIPE, &sa, NULL);
while ( !quit ) {