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

Creates and manages non-blocking child processes. More...

#include <Process.hpp>

Inheritance diagram for rstudio::launcher_plugins::system::process::ProcessSupervisor:
rstudio::launcher_plugins::Noncopyable

Static Public Member Functions

static bool hasRunningChildren ()
 Checks whether the supervisor is tracking any processes which have not exited yet. More...
 
static Error runAsyncProcess (const ProcessOptions &in_options, const AsyncProcessCallbacks &in_callbacks, std::shared_ptr< AbstractChildProcess > *out_childProcess=nullptr)
 Runs a child process asynchronously. More...
 
static void terminateAll ()
 Terminates all running children forcefully.
 
static bool waitForExit (const TimeDuration &in_maxWaitTime=TimeDuration::Infinity())
 Waits for all child processes to exit. More...
 

Additional Inherited Members

- 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.
 

Detailed Description

Creates and manages non-blocking child processes.

Member Function Documentation

◆ hasRunningChildren()

static bool rstudio::launcher_plugins::system::process::ProcessSupervisor::hasRunningChildren ( )
static

Checks whether the supervisor is tracking any processes which have not exited yet.

Returns
True if there are any children running; false otherwise.

◆ runAsyncProcess()

static Error rstudio::launcher_plugins::system::process::ProcessSupervisor::runAsyncProcess ( const ProcessOptions in_options,
const AsyncProcessCallbacks in_callbacks,
std::shared_ptr< AbstractChildProcess > *  out_childProcess = nullptr 
)
static

Runs a child process asynchronously.

Parameters
in_optionsThe options for the child process.
in_callbacksThe callbacks to invoke when output is written, an error occurs, or the process exits.
out_childProcessThe child process, if no error occurs on startup.
Returns
Success if the child process could be started; Error otherwise.

◆ waitForExit()

static bool rstudio::launcher_plugins::system::process::ProcessSupervisor::waitForExit ( const TimeDuration in_maxWaitTime = TimeDuration::Infinity())
static

Waits for all child processes to exit.

Parameters
in_maxWaitTimeThe maximum amount of time to wait for the child processes to exit. Default: no limit.
Returns
True if the function exited because the timeout was reached; false if the function exited because all child processes exited.

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