From 301abac0c1ca55e591b5afc53bf332cda294da19 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Dec 2016 20:13:37 +0100 Subject: [PATCH] LogInit: initialize out_fd properly to avoid closing stdin --- src/LogInit.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LogInit.cxx b/src/LogInit.cxx index 117c6d8dc..3cd5da0a1 100644 --- a/src/LogInit.cxx +++ b/src/LogInit.cxx @@ -51,7 +51,7 @@ static constexpr Domain log_domain("log"); #ifndef ANDROID -static int out_fd; +static int out_fd = -1; static AllocatedPath out_path = AllocatedPath::Null(); static void redirect_logs(int fd)