Fixes
This commit is contained in:
@ -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
|
||||||
@ -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;
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user