This commit is contained in:
2025-11-28 18:41:19 +05:30
parent 0674330fb1
commit 3de172ff6c
3 changed files with 8 additions and 4 deletions

View File

@ -63,6 +63,7 @@ namespace IACore
{ {
s_logFile.write(outLine.data(), outLine.size()); s_logFile.write(outLine.data(), outLine.size());
s_logFile.put('\n'); s_logFile.put('\n');
s_logFile.flush();
} }
} }
} // namespace IACore } // namespace IACore

View File

@ -52,15 +52,15 @@ namespace IACore
SharedPtr<ProcessHandle> handle = std::make_shared<ProcessHandle>(); SharedPtr<ProcessHandle> handle = std::make_shared<ProcessHandle>();
handle->IsRunning = true; handle->IsRunning = true;
handle->ThreadHandle = JoiningThread([&, cmd = IA_MOVE(command), args = std::move(args)]() mutable { handle->ThreadHandle = JoiningThread([=, h = handle.get(), cmd = IA_MOVE(command), args = std::move(args)]() mutable {
#if IA_PLATFORM_WINDOWS #if IA_PLATFORM_WINDOWS
auto result = SpawnProcessWindows(cmd, args, onOutputLineCallback, handle->ID); auto result = SpawnProcessWindows(cmd, args, onOutputLineCallback, h->ID);
#else #else
auto result = SpawnProcessPosix(cmd, args, onOutputLineCallback, handle->ID); auto result = SpawnProcessPosix(cmd, args, onOutputLineCallback, h->ID);
#endif #endif
handle->IsRunning = false; h->IsRunning = false;
if (!onFinishCallback) if (!onFinishCallback)
return; return;

View File

@ -70,6 +70,9 @@
# define __DEBUG_MODE__ # define __DEBUG_MODE__
# define __BUILD_MODE_NAME "debug" # define __BUILD_MODE_NAME "debug"
# define DEBUG_ONLY(v) v # define DEBUG_ONLY(v) v
# ifndef _DEBUG
# define _DEBUG
# endif
#else #else
# define __RELEASE_MODE__ # define __RELEASE_MODE__
# define __BUILD_MODE_NAME "release" # define __BUILD_MODE_NAME "release"