Commit Diff


commit - 9468027ba731a6ca955df8f49edd51cb4b46390a
commit + 0cf902af628108c5038cd20f5958d524a812e232
blob - 1a5de193434ee16dadaa92efb076d1a756423abf
blob + 171b6d2d39694a748b2c32e953ae1f6820739c48
--- gmid.c
+++ gmid.c
@@ -25,6 +25,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <poll.h>
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -668,6 +669,8 @@ main(int argc, char **argv)
 	struct tls_config *conf;
 	int sock, ch;
 
+	signal(SIGPIPE, SIG_IGN);
+
 	while ((ch = getopt(argc, argv, "c:d:hk:")) != -1) {
 		switch (ch) {
 		case 'c':