about summary refs log tree commit diff
path: root/main.c
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-06-18 16:53:42 +0300
committerNakidai <nakidai@disroot.org>2025-06-18 16:53:42 +0300
commit27291ef38236f890ae9fde4e04f0bec7562c5d4d (patch)
tree3c182421322039630413e85f4a35693d4d38a376 /main.c
parentf41dd07dfc4ad4e5b77ebc24986cb3422f44ea5e (diff)
downloadcptc-27291ef38236f890ae9fde4e04f0bec7562c5d4d.tar.gz
cptc-27291ef38236f890ae9fde4e04f0bec7562c5d4d.zip
Add ignoring broken pipe HEAD master
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index bec406b..bf24d0a 100644
--- a/main.c
+++ b/main.c
@@ -3,6 +3,7 @@
 #include "cptc.h"
 
 #include <ctype.h>
+#include <signal.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -99,5 +100,6 @@ int main(int argc, char **argv)
         usage(argv[0], false);
     }
 
+    signal(SIGPIPE, SIG_IGN);
     CPTC(address, port, id);
 }