From c83823a5253f6c09effea75e72101d2c7f318f88 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 15 Jan 2019 20:34:08 +1030 Subject: [PATCH] pytest: fix spurious valgrind output. Had a couple of tests randomly fail because a valgrind error file was not empty. It contained: lightning_channeld: Writing out status 65520: Broken pipe This shouldn't happen, but the simplest workaround is not to print that (useless) error. Signed-off-by: Rusty Russell --- common/status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/status.c b/common/status.c index c22ffffab..3eef72264 100644 --- a/common/status.c +++ b/common/status.c @@ -73,9 +73,9 @@ void status_send(const u8 *msg TAKES) { report_logging_io("SIGUSR1"); if (status_fd >= 0) { - int type =fromwire_peektype(msg); if (!wire_sync_write(status_fd, msg)) - err(1, "Writing out status %i", type); + /* No point printing error if lightningd is dead. */ + exit(1); } else { daemon_conn_send(status_conn, msg); }