From 53b35a42b7cde0038369ef33fd687942f4dfb64d Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 25 Jul 2020 15:56:29 +0200 Subject: Introduce and use TemporaryFile class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In addition to improving code clarity, this fixes a bug where the fallback code for “-fdiagnostics-color” tried to operate on a closed file descriptor. --- src/execute.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/execute.hpp') diff --git a/src/execute.hpp b/src/execute.hpp index a8f7fc17..e66f73a2 100644 --- a/src/execute.hpp +++ b/src/execute.hpp @@ -20,11 +20,13 @@ #include "system.hpp" +#include "Fd.hpp" + #include class Context; -int execute(const char* const* argv, int fd_out, int fd_err, pid_t* pid); +int execute(const char* const* argv, Fd&& fd_out, Fd&& fd_err, pid_t* pid); std::string find_executable(const Context& ctx, const char* name, const char* exclude_name); std::string find_executable_in_path(const char* name, -- cgit v1.2.1