How to redirect program output to current console window?

I am writing a console utility program based on BlankProgram and I wanted to launch UnrealBuildTool from it. I implemented this using FPlatformProcess::ExecProcess() and everything works fine.

However, ExecProcess() only returns program output when it’s finished which isn’t convenient. Is there any way in UE4 to redirect program output to current console window, so I can print UBT output in my program in real-time?

Alright, FPlatformProcess::CreateProc() with bLaunchDetached set to false is exactly what I needed! There’s also FPlatformProcess::WaitForProc() that waits for process to end.