Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::system::Process Class Referencefinal

Process Class. More...

#include <Process.h>

Classes

class  ProcessImpl
 

Public Types

using Ptr = std::unique_ptr<Process>
 

Public Member Functions

 ~Process ()
 
int wait () const noexcept
 
bool kill () const noexcept
 
pid_t getProcessId () const noexcept
 

Static Public Member Functions

static Result< Ptr, ErrorCodecreateEx (const std::string &exec, const std::vector< std::string > &args={}) noexcept
 
static pid_t getCurrentProcessId () noexcept
 

Private Member Functions

 Process ()=default
 

Private Attributes

std::unique_ptr< ProcessImplprocess_impl
 

Detailed Description

Process Class.

Member Typedef Documentation

◆ Ptr

using sese::system::Process::Ptr = std::unique_ptr<Process>

Constructor & Destructor Documentation

◆ ~Process()

Process::~Process ( )

◆ Process()

sese::system::Process::Process ( )
privatedefault

Member Function Documentation

◆ createEx()

sese::Result< Process::Ptr, sese::ErrorCode > Process::createEx ( const std::string & exec,
const std::vector< std::string > & args = {} )
staticnoexcept

◆ getCurrentProcessId()

sese::pid_t Process::getCurrentProcessId ( )
staticnodiscardnoexcept

Get the current process ID

Returns
Current process ID

References sese::system::Process::ProcessImpl::getCurrentProcessId().

◆ getProcessId()

sese::pid_t Process::getProcessId ( ) const
nodiscardnoexcept

Get the process ID

Returns
Process object ID

References process_impl.

◆ kill()

bool Process::kill ( ) const
nodiscardnoexcept

Kill the process

Returns
Operation result

References process_impl.

◆ wait()

int Process::wait ( ) const
nodiscardnoexcept

Wait for the process to end

Returns
Process exit code

References process_impl.

Member Data Documentation

◆ process_impl

std::unique_ptr<ProcessImpl> sese::system::Process::process_impl
private

Referenced by getProcessId(), kill(), and wait().


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