#include <zypp-core/ng/io/private/abstractspawnengine_p.h>
|
using | Environment = std::map<std::string,std::string> |
| For passing additional environment variables to set.
|
This implements the basic skeleton of ExternalProgram and Process. Taking care of forking the process and setting up stdout and stderr so both implementations can use the same code
Definition at line 21 of file abstractspawnengine_p.h.
◆ Environment
◆ AbstractSpawnEngine()
zyppng::AbstractSpawnEngine::AbstractSpawnEngine |
( |
| ) |
|
◆ ~AbstractSpawnEngine()
zyppng::AbstractSpawnEngine::~AbstractSpawnEngine |
( |
| ) |
|
|
virtual |
◆ createDefaultEngine()
◆ exitStatus()
int zyppng::AbstractSpawnEngine::exitStatus |
( |
| ) |
const |
◆ setExitStatus()
void zyppng::AbstractSpawnEngine::setExitStatus |
( |
const int | state | ) |
|
◆ executedCommand()
const std::string & zyppng::AbstractSpawnEngine::executedCommand |
( |
| ) |
const |
◆ execError()
const std::string & zyppng::AbstractSpawnEngine::execError |
( |
| ) |
const |
◆ setExecError()
void zyppng::AbstractSpawnEngine::setExecError |
( |
const std::string & | str | ) |
|
◆ chroot()
◆ setChroot()
void zyppng::AbstractSpawnEngine::setChroot |
( |
const zypp::Pathname & | chroot | ) |
|
◆ useDefaultLocale()
bool zyppng::AbstractSpawnEngine::useDefaultLocale |
( |
| ) |
const |
◆ setUseDefaultLocale()
void zyppng::AbstractSpawnEngine::setUseDefaultLocale |
( |
bool | defaultLocale | ) |
|
◆ environment()
◆ setEnvironment()
void zyppng::AbstractSpawnEngine::setEnvironment |
( |
const Environment & | environment | ) |
|
◆ pid()
pid_t zyppng::AbstractSpawnEngine::pid |
( |
| ) |
|
- Returns
- the pid of the forked process, without checking if the process is still running.
Definition at line 170 of file abstractspawnengine.cc.
◆ start()
virtual bool zyppng::AbstractSpawnEngine::start |
( |
const char *const * | argv, |
|
|
int | stdin_fd, |
|
|
int | stdout_fd, |
|
|
int | stderr_fd ) |
|
pure virtual |
Kickstart the process, if this returns true it is guaranteed that exec() was successful
Implemented in zyppng::ForkSpawnEngine.
◆ waitForExit()
virtual bool zyppng::AbstractSpawnEngine::waitForExit |
( |
const std::optional< uint64_t > & | timeout = {} | ) |
|
|
pure virtual |
◆ isRunning()
virtual bool zyppng::AbstractSpawnEngine::isRunning |
( |
bool | wait = false | ) |
|
|
pure virtual |
◆ notifyExited()
void zyppng::AbstractSpawnEngine::notifyExited |
( |
int | status | ) |
|
|
virtual |
Used to notify the backend that the process has ended, helpful when the process is tracked in another way than calling isRunning, for example in a eventloop.
Definition at line 99 of file abstractspawnengine.cc.
◆ dieWithParent()
bool zyppng::AbstractSpawnEngine::dieWithParent |
( |
| ) |
const |
◆ setDieWithParent()
void zyppng::AbstractSpawnEngine::setDieWithParent |
( |
bool | dieWithParent | ) |
|
◆ switchPgid()
bool zyppng::AbstractSpawnEngine::switchPgid |
( |
| ) |
const |
◆ setSwitchPgid()
void zyppng::AbstractSpawnEngine::setSwitchPgid |
( |
bool | switchPgid | ) |
|
◆ workingDirectory()
zypp::Pathname zyppng::AbstractSpawnEngine::workingDirectory |
( |
| ) |
const |
◆ setWorkingDirectory()
void zyppng::AbstractSpawnEngine::setWorkingDirectory |
( |
const zypp::Pathname & | workingDirectory | ) |
|
◆ fdsToMap()
const std::vector< int > & zyppng::AbstractSpawnEngine::fdsToMap |
( |
| ) |
const |
◆ addFd()
void zyppng::AbstractSpawnEngine::addFd |
( |
int | fd | ) |
|
◆ checkStatus()
int zyppng::AbstractSpawnEngine::checkStatus |
( |
int | status | ) |
|
◆ _useDefaultLocale
bool zyppng::AbstractSpawnEngine::_useDefaultLocale = false |
|
protected |
◆ _dieWithParent
bool zyppng::AbstractSpawnEngine::_dieWithParent = false |
|
protected |
◆ _switchPgid
bool zyppng::AbstractSpawnEngine::_switchPgid = false |
|
protected |
◆ _pid
pid_t zyppng::AbstractSpawnEngine::_pid = -1 |
|
protected |
◆ _exitStatus
int zyppng::AbstractSpawnEngine::_exitStatus = 0 |
|
protected |
◆ _execError
std::string zyppng::AbstractSpawnEngine::_execError |
|
protected |
◆ _executedCommand
std::string zyppng::AbstractSpawnEngine::_executedCommand |
|
protected |
◆ _args
std::vector<std::string> zyppng::AbstractSpawnEngine::_args |
|
protected |
◆ _environment
◆ _chroot
◆ _workingDirectory
◆ _mapFds
std::vector<int> zyppng::AbstractSpawnEngine::_mapFds |
|
protected |
The documentation for this class was generated from the following files: