summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-02-04 20:25:22 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-02-04 20:25:33 +0100
commitad9606401da9bb32bbf4003eea1f0e93b8e8f16c (patch)
treed642c78b6bcee54e4eae68e5ee7c66086e473904
parentfd5a244dc2c78c9a545f9c25c0a0ee384eb6e76b (diff)
downloadustream-ssl-ad9606401da9bb32bbf4003eea1f0e93b8e8f16c.tar.gz
example: ignore SIGPIPE
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r--ustream-example.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ustream-example.c b/ustream-example.c
index ab9f6f7..3e10543 100644
--- a/ustream-example.c
+++ b/ustream-example.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <signal.h>
#include <libubox/ustream.h>
#include <libubox/uloop.h>
@@ -199,6 +200,7 @@ int main(int argc, char **argv)
{
int ch;
+ signal(SIGPIPE, SIG_IGN);
ctx = ustream_ssl_context_new(true);
ustream_ssl_context_set_crt_file(ctx, "example.crt");
ustream_ssl_context_set_key_file(ctx, "example.key");