RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
Public Member Functions | Protected Member Functions | List of all members
rstudio::launcher_plugins::system::process::AbstractChildProcess Class Referenceabstract

Base class for a child process, which will be launched via rsandbox. More...

#include <Process.hpp>

Inheritance diagram for rstudio::launcher_plugins::system::process::AbstractChildProcess:
rstudio::launcher_plugins::Noncopyable rstudio::launcher_plugins::system::process::SyncChildProcess

Public Member Functions

virtual ~AbstractChildProcess ()=default
 Virtual destructor for inheritance.
 
pid_t getPid () const
 Gets the PID of this child process. More...
 
virtual Error terminate ()
 Terminates the child process. More...
 
virtual Error writeToStdin (const std::string &in_string, bool in_eof)=0
 Writes the specified string to stdin. More...
 
- Public Member Functions inherited from rstudio::launcher_plugins::Noncopyable
 Noncopyable ()=default
 Default constructor.
 
 Noncopyable (const Noncopyable &)=delete
 Deleted copy constructor.
 
Noncopyableoperator= (const Noncopyable &)=delete
 Deleted assignment operator.
 

Protected Member Functions

 AbstractChildProcess (const ProcessOptions &in_options)
 Constructor. More...
 
Error run ()
 Forks and executes the child process, passing along arguments and environment variables. More...
 
 PRIVATE_IMPL (m_baseImpl)
 

Detailed Description

Base class for a child process, which will be launched via rsandbox.

Constructor & Destructor Documentation

◆ AbstractChildProcess()

rstudio::launcher_plugins::system::process::AbstractChildProcess::AbstractChildProcess ( const ProcessOptions in_options)
explicitprotected

Constructor.

Parameters
in_optionsThe options for the child process.

Member Function Documentation

◆ getPid()

pid_t rstudio::launcher_plugins::system::process::AbstractChildProcess::getPid ( ) const

Gets the PID of this child process.

Returns
The PID of this child process.

◆ run()

Error rstudio::launcher_plugins::system::process::AbstractChildProcess::run ( )
protected

Forks and executes the child process, passing along arguments and environment variables.

Returns
Success if the child process could be started; Error otherwise.

◆ terminate()

virtual Error rstudio::launcher_plugins::system::process::AbstractChildProcess::terminate ( )
virtual

Terminates the child process.

Returns
Success if the child process was terminated; Error otherwise.

◆ writeToStdin()

virtual Error rstudio::launcher_plugins::system::process::AbstractChildProcess::writeToStdin ( const std::string &  in_string,
bool  in_eof 
)
pure virtual

Writes the specified string to stdin.

Parameters
in_stringThe data to write to stdin.
in_eofTrue if this is the last data to write to stdin.
Returns
Success if the data could be written; Error otherwise.

Implemented in rstudio::launcher_plugins::system::process::SyncChildProcess.


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