summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-09-07 14:30:02 -0400
committerJune McEnroe <june@causal.agency>2019-09-07 14:30:02 -0400
commit86ecab1e04989e5d1bf692563974e7850363e87d (patch)
tree7281c17e84247d62992b1519b13a618edf195a27 /bin
parentAdd A Memory Called Empire (diff)
downloadsrc-86ecab1e04989e5d1bf692563974e7850363e87d.tar.gz
src-86ecab1e04989e5d1bf692563974e7850363e87d.zip
Ignore SIGPIPE in relay
Allows restarting consumers safely.
Diffstat (limited to 'bin')
-rw-r--r--bin/relay.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/relay.c b/bin/relay.c
index 506d9561..4fd07e39 100644
--- a/bin/relay.c
+++ b/bin/relay.c
@@ -18,6 +18,7 @@
 #include <netdb.h>
 #include <netinet/in.h>
 #include <poll.h>
+#include <signal.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -104,6 +105,7 @@ int main(int argc, char *argv[]) {
 	const char *chan = argv[4];
 
 	setlinebuf(stdout);
+	signal(SIGPIPE, SIG_IGN);
 
 	struct tls_config *config = tls_config_new();
 	if (!config) errx(EX_SOFTWARE, "tls_config_new");