Turi Create  4.0
Process Management

Cross platform (Windows, Mac, Linux) sub-process management. More...

Classes

class  turi::process
 

Functions

size_t turi::get_parent_pid ()
 
void turi::wait_for_parent_exit (size_t parent_pid)
 
bool turi::is_process_running (size_t pid)
 
boost::optional< std::string > turi::getenv_str (const char *variable_name)
 

Detailed Description

Cross platform (Windows, Mac, Linux) sub-process management.

Function Documentation

◆ get_parent_pid()

size_t turi::get_parent_pid ( )

Get the PID of my parent process.

◆ getenv_str()

boost::optional<std::string> turi::getenv_str ( const char *  variable_name)

Returns the environment variable's value; Note: on windows, the length of the return value is limited to 65534.

◆ is_process_running()

bool turi::is_process_running ( size_t  pid)

Returns true if process is running

◆ wait_for_parent_exit()

void turi::wait_for_parent_exit ( size_t  parent_pid)

Waits for a pid to exit. (The function is misnamed. This will work for all PIDs not just my parent)