NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Util::Subprocess Class Reference

This class spawns a new subprocess and executes a specific command. As soon as the subprocess object goes out of scope the subprocess is terminated. More...

#include <Subprocess.hpp>

Public Member Functions

 Subprocess (std::string cmd, std::vector< std::string > argv)
 Spawns a new subprocess with a specific cmd command and arguments. More...
 
 ~Subprocess ()
 
bool kill ()
 
uint64_t getPid ()
 

Detailed Description

This class spawns a new subprocess and executes a specific command. As soon as the subprocess object goes out of scope the subprocess is terminated.

Constructor & Destructor Documentation

◆ Subprocess()

NES::Util::Subprocess::Subprocess ( std::string  cmd,
std::vector< std::string >  argv 
)

Spawns a new subprocess with a specific cmd command and arguments.

Parameters
cmdthat should be executed
argvarguments

References magic_enum::enum_integer(), NES_DEBUG, NES_FATAL_ERROR, NES::Util::READ, and NES::Util::WRITE.

Here is the call graph for this function:

◆ ~Subprocess()

NES::Util::Subprocess::~Subprocess ( )

References kill(), and NES_INFO.

Here is the call graph for this function:

Member Function Documentation

◆ getPid()

uint64_t NES::Util::Subprocess::getPid ( )

Method to get the pid of a process @retun pid

◆ kill()

bool NES::Util::Subprocess::kill ( )

Method to kill a process

Returns
success code

References NES_ASSERT, and NES_DEBUG.

Referenced by ~Subprocess().

Here is the caller graph for this function:

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