diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2020-07-25 15:56:29 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2020-07-25 16:04:39 +0200 |
commit | 53b35a42b7cde0038369ef33fd687942f4dfb64d (patch) | |
tree | 8e53dd3eb93cf9bd37323884c388eab63fa6c620 /src/execute.hpp | |
parent | 60d774d42c0900696a5bb95ebac59134bf3091b8 (diff) | |
download | ccache-53b35a42b7cde0038369ef33fd687942f4dfb64d.tar.gz |
Introduce and use TemporaryFile class
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.
Diffstat (limited to 'src/execute.hpp')
-rw-r--r-- | src/execute.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 <string> 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, |