mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
lightningd: ignore SIGPIPE.
It can happen when a peer hangs up, but also a JSON connection. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e7e7345596
commit
bff81c0ecf
@ -22,6 +22,7 @@
|
||||
#include <ccan/timer/timer.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
@ -525,6 +526,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user