Files
UnrealEngineUWP/Engine/Source/Programs/TestPAL/Private/Parent.h
Dmitry Rekman e86138d4ca Refactored FProcHandle API in platform abstraction layer.
- Deprecated FProcHandle::Close() in favor of existing FPlatformProcess::CloseProc() (symmetric to FPlatformProcess::CreateProc()).
- Linux: made FProcHandle instances safe to pass by value.
- Linux: added support for "fire and forget" children, which will not leave zombies (at the expense of extra threads and a leaked thread handle).
- Extended TestPAL with tests for most of the above functionality.

#codereview Michael.Trepka, Josh.Adams, Robert.Manuszewski, Jaroslaw.Surowiec

[CL 2476050 by Dmitry Rekman in Main branch]
2015-03-11 20:10:19 -04:00

28 lines
561 B
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
DECLARE_LOG_CATEGORY_EXTERN(LogTestPAL, Verbose, All);
class FParent
{
/** Children to be controlled */
TArray< FProcHandle > Children;
/** Total children to spawn */
int NumTotalChildren;
/** Max children at once */
int MaxChildrenAtOnce;
/** Launches the child, returns the launched process handle. */
FProcHandle Launch(bool bDetached = false);
public:
/** Spawns the children one by one */
void Run();
FParent(int InNumTotalChildren, int InMaxChildrenAtOnce);
};