diff --git a/daemon/lightningd.c b/daemon/lightningd.c index bf0deb41c..e568daa6d 100644 --- a/daemon/lightningd.c +++ b/daemon/lightningd.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -524,7 +525,10 @@ int main(int argc, char *argv[]) errx(1, "no arguments accepted"); check_config(dstate); - + + /* Ignore SIGPIPE: we look at our write return values*/ + signal(SIGPIPE, SIG_IGN); + /* Set up node ID and private key. */ secrets_init(dstate); new_node(dstate, &dstate->id);