1 #ifndef ZYPPNG_IO_PRIVATE_ABSTRACTPROCESSBACKEND_H 2 #define ZYPPNG_IO_PRIVATE_ABSTRACTPROCESSBACKEND_H 60 virtual bool start (
const char *
const *argv,
int stdin_fd,
int stdout_fd,
int stderr_fd ) = 0;
62 virtual bool waitForExit (
const std::optional<uint64_t> &timeout = {} ) = 0;
63 virtual bool isRunning (
bool wait =
false ) = 0;
81 const std::vector<int> &
fdsToMap ()
const;
82 void addFd (
int fd );
114 #endif // ZYPPNG_IO_PRIVATE_ABSTRACTPROCESSBACKEND_H zypp::Pathname workingDirectory() const
zypp::Pathname _workingDirectory
Working directory.
virtual void notifyExited(int status)
static std::unique_ptr< zyppng::AbstractSpawnEngine > createDefaultEngine()
std::string _execError
Remember execution errors like failed fork/exec.
const std::string & execError() const
String related utilities and Regular expression matching.
bool dieWithParent() const
void setUseDefaultLocale(bool defaultLocale)
bool _dieWithParent
Should the process die with the parent process.
virtual bool start(const char *const *argv, int stdin_fd, int stdout_fd, int stderr_fd)=0
void setWorkingDirectory(const zypp::Pathname &workingDirectory)
std::vector< std::string > _args
The arguments we want to pass to the program.
void setExecError(const std::string &str)
void setEnvironment(const Environment &environment)
void setChroot(const zypp::Pathname &chroot)
zypp::Pathname _chroot
Path to chroot into.
bool useDefaultLocale() const
void setDieWithParent(bool dieWithParent)
std::string _executedCommand
Store the command we're executing.
virtual bool waitForExit(const std::optional< uint64_t > &timeout={})=0
zypp::Pathname chroot() const
void setExitStatus(const int state)
int checkStatus(int status)
const std::string & executedCommand() const
virtual bool isRunning(bool wait=false)=0
void setSwitchPgid(bool switchPgid)
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.
Environment environment() const
const std::vector< int > & fdsToMap() const
virtual ~AbstractSpawnEngine()
Environment _environment
Environment variables to set in the new process.