diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-02-04 20:25:22 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-02-04 20:25:33 +0100 |
commit | ad9606401da9bb32bbf4003eea1f0e93b8e8f16c (patch) | |
tree | d642c78b6bcee54e4eae68e5ee7c66086e473904 | |
parent | fd5a244dc2c78c9a545f9c25c0a0ee384eb6e76b (diff) | |
download | ustream-ssl-ad9606401da9bb32bbf4003eea1f0e93b8e8f16c.tar.gz |
example: ignore SIGPIPE
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | ustream-example.c | 2 |
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"); |