1#ifndef ZYPPNG_IO_PRIVATE_ABSTRACTPROCESSBACKEND_H
2#define ZYPPNG_IO_PRIVATE_ABSTRACTPROCESSBACKEND_H
61 virtual bool waitForExit (
const std::optional<uint64_t> &timeout = {} ) = 0;
80 const std::vector<int> &
fdsToMap ()
const;
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
zypp::Pathname _chroot
Path to chroot into.
virtual bool isRunning(bool wait=false)=0
bool dieWithParent() const
void setSwitchPgid(bool switchPgid)
const std::string & executedCommand() const
Environment environment() const
const std::vector< int > & fdsToMap() const
zypp::Pathname workingDirectory() const
void setExecError(const std::string &str)
zypp::Pathname _workingDirectory
Working directory.
std::string _execError
Remember execution errors like failed fork/exec.
std::string _executedCommand
Store the command we're executing.
virtual bool start(const char *const *argv, int stdin_fd, int stdout_fd, int stderr_fd)=0
bool _dieWithParent
Should the process die with the parent process.
virtual ~AbstractSpawnEngine()
std::map< std::string, std::string > Environment
For passing additional environment variables to set.
std::vector< int > _mapFds
Additional file descriptors we want to map to the new process.
void setExitStatus(const int state)
void setChroot(const zypp::Pathname &chroot)
virtual bool waitForExit(const std::optional< uint64_t > &timeout={})=0
virtual void notifyExited(int status)
Environment _environment
Environment variables to set in the new process.
bool useDefaultLocale() const
void setWorkingDirectory(const zypp::Pathname &workingDirectory)
int checkStatus(int status)
zypp::Pathname chroot() const
void setUseDefaultLocale(bool defaultLocale)
static std::unique_ptr< zyppng::AbstractSpawnEngine > createDefaultEngine()
std::vector< std::string > _args
The arguments we want to pass to the program.
void setEnvironment(const Environment &environment)
const std::string & execError() const
void setDieWithParent(bool dieWithParent)
String related utilities and Regular expression matching.