From ec85afdbc7b37f68df8ce74c42649e82ac35b4c1 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 14 Sep 2024 14:45:40 +0200 Subject: Core/Common: Output stdout/stderr from child process without waiting for it to finish (cherry picked from commit f270686201c84a07f67a9615fd610d917fc8f802) --- src/common/Utilities/StartProcess.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/common/Utilities/StartProcess.h') diff --git a/src/common/Utilities/StartProcess.h b/src/common/Utilities/StartProcess.h index 71452315e77..b99a24a9f55 100644 --- a/src/common/Utilities/StartProcess.h +++ b/src/common/Utilities/StartProcess.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef Process_h__ -#define Process_h__ +#ifndef TRINITYCORE_START_PROCESS_H +#define TRINITYCORE_START_PROCESS_H #include "Define.h" #include @@ -32,8 +32,8 @@ namespace Trinity /// When an input path is given, the file will be routed to the processes stdin. /// When the process is marked as secure no arguments are leaked to logs. /// Note that most executables expect it's name as the first argument. -TC_COMMON_API int StartProcess(std::string const& executable, std::vector const& args, - std::string const& logger, std::string input_file = "", +TC_COMMON_API int32 StartProcess(std::string executable, std::vector args, + std::string logger, std::string input_file = "", bool secure = false); /// Platform and library independent representation @@ -45,7 +45,7 @@ public: /// Returns the future which contains the result of the process /// as soon it is finished. - virtual std::future& GetFutureResult() = 0; + virtual std::future& GetFutureResult() = 0; /// Tries to terminate the process virtual void Terminate() = 0; @@ -67,4 +67,4 @@ TC_COMMON_API std::string SearchExecutableInPath(std::string const& filename); } // namespace Trinity -#endif // Process_h__ +#endif // TRINITYCORE_START_PROCESS_H -- cgit v1.2.3