E-MailRelay

Public Types | Public Member Functions | Public Attributes | List of all members
G::NewProcess::Config Struct Reference

Configuration structure for G::NewProcess. More...

`#include <gnewprocess.h>`

Collaboration diagram for G::NewProcess::Config:
[legend]

## Public Types
using | Fd = NewProcess::Fd
using | FormatFn = std::string(*)(std::string, int)

## Public Member Functions
Config & | set_env (const Environment &)
Config & | set_stdin (Fd) noexcept
Config & | set_stdout (Fd) noexcept
Config & | set_stderr (Fd) noexcept
Config & | set_cd (const Path &)
Config & | set_strict_exe (bool=true) noexcept
Config & | set_exec_search_path (const std::string &)
Config & | set_run_as (Identity)
Config & | set_strict_id (bool=true) noexcept
Config & | set_close_other_fds (bool=true) noexcept
Config & | set_exec_error_exit (int) noexcept
Config & | set_exec_error_format (const std::string &)
Config & | set_exec_error_format_fn (FormatFn)

## Public Attributes
Environment | env {Environment::minimal()}
NewProcess::Fd | stdin {Fd::devnull()}
NewProcess::Fd | stdout {Fd::pipe()}
NewProcess::Fd | stderr {Fd::devnull()}
Path | cd
bool | strict_exe {true}
std::string | exec_search_path
Identity | run_as {Identity::invalid()}
bool | strict_id {true}
bool | close_other_fds {true}
int | exec_error_exit {127}
std::string | exec_error_format
FormatFn | exec_error_format_fn {nullptr}
HANDLE | keep_handle_1 {HNULL}
HANDLE | keep_handle_2 {HNULL}

## Detailed Description

Configuration structure for G::NewProcess.

Definition at line 88 of file gnewprocess.h.

## Member Typedef Documentation

## ◆ Fd

using G::NewProcess::Config::Fd = NewProcess::Fd

Definition at line 90 of file gnewprocess.h.

## ◆ FormatFn

using G::NewProcess::Config::FormatFn = std::string (*)(std::string,int)

Definition at line 91 of file gnewprocess.h.

## Member Function Documentation

## ◆ set_cd()

G::NewProcess::Config & G::NewProcess::Config::set_cd | ( | const Path & | p | ) |
| inline

Definition at line 283 of file gnewprocess.h.

## ◆ set_close_other_fds()

G::NewProcess::Config & G::NewProcess::Config::set_close_other_fds | ( | bool | b = `true` | ) |
| inline noexcept

Definition at line 288 of file gnewprocess.h.

## ◆ set_env()

G::NewProcess::Config & G::NewProcess::Config::set_env | ( | const Environment & | e | ) |
| inline

Definition at line 279 of file gnewprocess.h.

## ◆ set_exec_error_exit()

G::NewProcess::Config & G::NewProcess::Config::set_exec_error_exit | ( | int | n | ) |
| inline noexcept

Definition at line 289 of file gnewprocess.h.

## ◆ set_exec_error_format()

G::NewProcess::Config & G::NewProcess::Config::set_exec_error_format | ( | const std::string & | s | ) |
| inline

Definition at line 290 of file gnewprocess.h.

## ◆ set_exec_error_format_fn()

G::NewProcess::Config & G::NewProcess::Config::set_exec_error_format_fn | ( | FormatFn | f | ) |
| inline

Definition at line 291 of file gnewprocess.h.

## ◆ set_exec_search_path()

G::NewProcess::Config & G::NewProcess::Config::set_exec_search_path | ( | const std::string & | s | ) |
| inline

Definition at line 285 of file gnewprocess.h.

## ◆ set_run_as()

G::NewProcess::Config & G::NewProcess::Config::set_run_as | ( | Identity | i | ) |
| inline

Definition at line 286 of file gnewprocess.h.

## ◆ set_stderr()

G::NewProcess::Config & G::NewProcess::Config::set_stderr | ( | Fd | fd | ) |
| inline noexcept

Definition at line 282 of file gnewprocess.h.

## ◆ set_stdin()

G::NewProcess::Config & G::NewProcess::Config::set_stdin | ( | Fd | fd | ) |
| inline noexcept

Definition at line 280 of file gnewprocess.h.

## ◆ set_stdout()

G::NewProcess::Config & G::NewProcess::Config::set_stdout | ( | Fd | fd | ) |
| inline noexcept

Definition at line 281 of file gnewprocess.h.

## ◆ set_strict_exe()

G::NewProcess::Config & G::NewProcess::Config::set_strict_exe | ( | bool | b = `true` | ) |
| inline noexcept

Definition at line 284 of file gnewprocess.h.

## ◆ set_strict_id()

G::NewProcess::Config & G::NewProcess::Config::set_strict_id | ( | bool | b = `true` | ) |
| inline noexcept

Definition at line 287 of file gnewprocess.h.

## Member Data Documentation

## ◆ cd

Path G::NewProcess::Config::cd

Definition at line 96 of file gnewprocess.h.

## ◆ close_other_fds

bool G::NewProcess::Config::close_other_fds {true}

Definition at line 101 of file gnewprocess.h.

## ◆ env

Environment G::NewProcess::Config::env {Environment::minimal()}

Definition at line 92 of file gnewprocess.h.

## ◆ exec_error_exit

int G::NewProcess::Config::exec_error_exit {127}

Definition at line 102 of file gnewprocess.h.

## ◆ exec_error_format

std::string G::NewProcess::Config::exec_error_format

Definition at line 103 of file gnewprocess.h.

## ◆ exec_error_format_fn

FormatFn G::NewProcess::Config::exec_error_format_fn {nullptr}

Definition at line 104 of file gnewprocess.h.

## ◆ exec_search_path

std::string G::NewProcess::Config::exec_search_path

Definition at line 98 of file gnewprocess.h.

## ◆ keep_handle_1

HANDLE G::NewProcess::Config::keep_handle_1 {HNULL}

Definition at line 105 of file gnewprocess.h.

## ◆ keep_handle_2

HANDLE G::NewProcess::Config::keep_handle_2 {HNULL}

Definition at line 106 of file gnewprocess.h.

## ◆ run_as

Identity G::NewProcess::Config::run_as {Identity::invalid()}

Definition at line 99 of file gnewprocess.h.

## ◆ stderr

NewProcess::Fd G::NewProcess::Config::stderr {Fd::devnull()}

Definition at line 95 of file gnewprocess.h.

## ◆ stdin

NewProcess::Fd G::NewProcess::Config::stdin {Fd::devnull()}

Definition at line 93 of file gnewprocess.h.

## ◆ stdout

NewProcess::Fd G::NewProcess::Config::stdout {Fd::pipe()}

Definition at line 94 of file gnewprocess.h.

## ◆ strict_exe

bool G::NewProcess::Config::strict_exe {true}

Definition at line 97 of file gnewprocess.h.

## ◆ strict_id

bool G::NewProcess::Config::strict_id {true}

Definition at line 100 of file gnewprocess.h.

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

- /tmp/slackdce/slackrepo.HKsbdz/build_emailrelay/emailrelay-2.6/src/glib/gnewprocess.h