# FPlatformProcess::CreateProc - Know when process is complete?

**URL:** <https://forums.unrealengine.com/t/fplatformprocess-createproc-know-when-process-is-complete/346742>\
**Category:** C++\
**Tags:** unreal-engine, question, CPP, process\
**Created:** [February 8, 2016, 12:42am UTC](https://forums.unrealengine.com/t/fplatformprocess-createproc-know-when-process-is-complete/346742 "2016-02-08T00:42:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taurian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Taurian](https://forums.unrealengine.com/u/Taurian)\
**Post date:** [February 8, 2016, 12:42am UTC](https://forums.unrealengine.com/t/fplatformprocess-createproc-know-when-process-is-complete/346742/1 "2016-02-08T00:42:14Z")

</div>

Is it possible to know when this process is done running?  
FPlatformProcess::CreateProc

> **[FGenericPlatformProcess::CloseProc](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/GenericPlatform/FGenericPlatformProcess/CloseProc/)**
>
> Cleans up \[FProcHandle\](API\\Runtime\\Core\\HoloLens\\FProcHandle) after we're done with it.

> **[FGenericPlatformProcess](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/GenericPlatform/FGenericPlatformProcess/)**
>
> Generic implementation for most platforms, these tend to be unused and unimplemented

Thanks

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [February 8, 2016, 2:18am UTC](https://forums.unrealengine.com/t/fplatformprocess-createproc-know-when-process-is-complete/346742/2 "2016-02-08T02:18:45Z")

</div>

You did search more? those 2 should help:

> **[FGenericPlatformProcess::WaitForProc](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Core/GenericPlatform/FGenericPlatformProcess/WaitForProc/)**
>
> Waits for a process to stop

> **[FGenericPlatformProcess::GetProcReturnCode](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Core/GenericPlatform/FGenericPlatformProcess/GetProcReturnCode/)**
>
> Retrieves the termination status of the specified process.

Create FProcHandle use it in CreateProc and keep it for farther use

WaitForProc will probably freeze UE4 if you use it on main thread, so watch out, try doing it on different thread.
