From 21d7ed0cf6faa32a6d00a27cf75cd4006726218a Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 21 Mar 2017 12:26:22 +0100 Subject: [PATCH] subd: Do not close STDOUT in sub-daemons The STDOUT fd being reused as communication sockets with other daemons was causing some unexpected crashes if the sub-daemon wrote something, e.g., using `log_*`. Not closing it should avoid that conflict. --- lightningd/subd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lightningd/subd.c b/lightningd/subd.c index 75b4fb4f1..5de19bfa5 100644 --- a/lightningd/subd.c +++ b/lightningd/subd.c @@ -129,7 +129,6 @@ static int subd(const char *dir, const char *name, bool debug, goto child_errno_fail; fdnum++; } - close(STDOUT_FILENO); /* Make (fairly!) sure all other fds are closed. */ max = sysconf(_SC_OPEN_MAX);