userver: engine::subprocess::ChildProcess Class Reference
Loading...
Searching...
No Matches
engine::subprocess::ChildProcess Class Referencefinal

Detailed Description

Definition at line 20 of file child_process.hpp.

Public Member Functions

 ChildProcess (ChildProcess &&) noexcept
 
ChildProcessoperator= (ChildProcess &&) noexcept
 
 ~ChildProcess ()
 Does not terminate the child process (just detaches from it).
 
int GetPid () const
 Returns pid of the child process.
 
void Wait ()
 
template<typename Rep , typename Period >
bool WaitFor (std::chrono::duration< Rep, Period > duration)
 
template<typename Clock , typename Duration >
bool WaitUntil (std::chrono::time_point< Clock, Duration > until)
 
bool WaitUntil (Deadline deadline)
 
ChildProcessStatus Get ()
 
void SendSignal (int signum)
 Send a signal to the child process.
 

Member Function Documentation

◆ Get()

ChildProcessStatus engine::subprocess::ChildProcess::Get ( )

Wait for the child process to terminate. Returns ChildProcessStatus of finished subprocess.

◆ Wait()

void engine::subprocess::ChildProcess::Wait ( )

Wait for the child process to terminate. Ignores cancellations of the current task.

◆ WaitFor()

template<typename Rep , typename Period >
bool engine::subprocess::ChildProcess::WaitFor ( std::chrono::duration< Rep, Period > duration)
inline

Wait for the child process to terminate. Returns if this did not happen for the specified timeout duration.

Definition at line 42 of file child_process.hpp.

◆ WaitUntil() [1/2]

bool engine::subprocess::ChildProcess::WaitUntil ( Deadline deadline)

Wait for the child process to terminate. Returns if this did not happen until the specified Deadline has been reached.

◆ WaitUntil() [2/2]

template<typename Clock , typename Duration >
bool engine::subprocess::ChildProcess::WaitUntil ( std::chrono::time_point< Clock, Duration > until)
inline

Wait for the child process to terminate. Returns if this did not happen until the specified time point has been reached.

Definition at line 50 of file child_process.hpp.


The documentation for this class was generated from the following file: