E-MailRelay
Public Types | Public Member Functions | Static Public Member Functions | List of all members
G::NewProcessImp Class Reference

A pimple-pattern implementation class used by G::NewProcess. More...

Public Types

using Fd = NewProcess::Fd
 

Public Member Functions

 NewProcessImp (const Path &exe, const StringArray &args, const Environment &env, Fd fd_stdin, Fd fd_stdout, Fd fd_stderr, const G::Path &cd, bool strict_path, Identity run_as_id, bool strict_id, int exec_error_exit, const std::string &exec_error_format, std::string(*exec_error_format_fn)(std::string, int))
 
int id () const noexcept
 
NewProcessWaitablewaitable () noexcept
 
int run (const Path &, const StringArray &, const Environment &, bool strict_path)
 
void kill () noexcept
 
std::string execErrorFormat (const std::string &format, int errno_)
 
 NewProcessImp (const NewProcessImp &)=delete
 
 NewProcessImp (NewProcessImp &&)=delete
 
void operator= (const NewProcessImp &)=delete
 
void operator= (NewProcessImp &&)=delete
 

Static Public Member Functions

static std::pair< bool, pid_t > fork ()
 
static void printError (int, const std::string &s)
 
static bool duplicate (Fd, int)
 

Detailed Description

A pimple-pattern implementation class used by G::NewProcess.

Definition at line 77 of file gnewprocess_unix.cpp.

Member Typedef Documentation

◆ Fd

Definition at line 80 of file gnewprocess_unix.cpp.

Constructor & Destructor Documentation

◆ NewProcessImp()

G::NewProcessImp::NewProcessImp ( const Path exe,
const StringArray args,
const Environment env,
Fd  fd_stdin,
Fd  fd_stdout,
Fd  fd_stderr,
const G::Path cd,
bool  strict_path,
Identity  run_as_id,
bool  strict_id,
int  exec_error_exit,
const std::string &  exec_error_format,
std::string(*)(std::string, int)  exec_error_format_fn 
)

Definition at line 152 of file gnewprocess_unix.cpp.

Member Function Documentation

◆ duplicate()

bool G::NewProcessImp::duplicate ( Fd  fd,
int  fd_std 
)
static

Definition at line 320 of file gnewprocess_unix.cpp.

◆ execErrorFormat()

std::string G::NewProcessImp::execErrorFormat ( const std::string &  format,
int  errno_ 
)

Definition at line 312 of file gnewprocess_unix.cpp.

◆ fork()

std::pair< bool, pid_t > G::NewProcessImp::fork ( )
static

Definition at line 230 of file gnewprocess_unix.cpp.

◆ id()

int G::NewProcessImp::id ( ) const
noexcept

Definition at line 292 of file gnewprocess_unix.cpp.

◆ kill()

void G::NewProcessImp::kill ( )
noexcept

Definition at line 302 of file gnewprocess_unix.cpp.

◆ printError()

void G::NewProcessImp::printError ( int  stdxxx,
const std::string &  s 
)
static

Definition at line 242 of file gnewprocess_unix.cpp.

◆ run()

int G::NewProcessImp::run ( const Path exe,
const StringArray args,
const Environment env,
bool  strict_path 
)

Definition at line 249 of file gnewprocess_unix.cpp.

◆ waitable()

G::NewProcessWaitable & G::NewProcessImp::waitable ( )
noexcept

Definition at line 297 of file gnewprocess_unix.cpp.


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