softwarecontainer
0.18.0-739e8d7 2017-05-04
|
Abstract class for jobs which get executed inside a container. More...
#include <jobabstract.h>
Public Member Functions | |
JobAbstract (ExecutablePtr &executable) | |
void | captureStdin () |
void | setOutputFile (const std::string &path) |
void | captureStdout () |
void | captureStderr () |
int | wait () |
int | stdout () |
int | stderr () |
int | stdin () |
pid_t | pid () |
bool | isSuccess () |
Helper about return value of jobs. More... | |
bool | isError () |
Helper about return value of jobs. More... | |
bool | isRunning () |
That method always returns true as soon as the start() method has been called, even if the command fails to start, since we don't know if the exec() occurring after the fork into the container actually succeeds... More... | |
void | setEnvironmentVariable (const std::string &key, const std::string &value) |
void | setEnvironmentVariables (const EnvironmentVariables &env) |
Static Public Attributes | |
static constexpr int | UNASSIGNED_STREAM |
Protected Types | |
typedef std::shared_ptr< Executable > | ExecutablePtr |
Protected Member Functions | |
LOG_DECLARE_CLASS_CONTEXT ("JOAB","JobAbstract") | |
Protected Attributes | |
EnvironmentVariables | m_env |
ExecutablePtr | m_executable |
int | m_exitStatus |
pid_t | m_pid |
int | m_stdin [2] |
int | m_stdout [2] |
int | m_stderr [2] |
Abstract class for jobs which get executed inside a container.
Definition at line 29 of file jobabstract.h.
bool softwarecontainer::JobAbstract::isSuccess | ( | ) |
Helper about return value of jobs.
Describes whether the exit status of a command or a function indicates success or not
Note that this method will interpret exit status only for the last job
Definition at line 85 of file jobabstract.cpp.
bool softwarecontainer::JobAbstract::isError | ( | ) |
Helper about return value of jobs.
Describes whether the exit status of a command or a function indicates error or not
Note that this method will interpret exit status only for the last job
Definition at line 94 of file jobabstract.cpp.
bool softwarecontainer::JobAbstract::isRunning | ( | ) |
That method always returns true as soon as the start() method has been called, even if the command fails to start, since we don't know if the exec() occurring after the fork into the container actually succeeds...
Definition at line 103 of file jobabstract.cpp.