file: add exec method, rework read method
[project/rpcd.git] / main.c
diff --git a/main.c b/main.c
index 52725cd..2fce5b5 100644 (file)
--- a/main.c
+++ b/main.c
@@ -21,6 +21,7 @@
 
 #include <libubox/blobmsg_json.h>
 #include <libubus.h>
+#include <signal.h>
 
 #include "session.h"
 #include "file.h"
@@ -42,6 +43,8 @@ int main(int argc, char **argv)
                }
        }
 
+       signal(SIGPIPE, SIG_IGN);
+
        argc -= optind;
        argv += optind;