softwarecontainer
0.18.0-739e8d7 2017-05-04
|
Use this class to execute a command line in a SoftwareContainer. More...
#include <commandjob.h>
Public Member Functions | |
CommandJob (ExecutablePtr executable, const std::string &command) | |
bool | setWorkingDirectory (const std::string &folder) |
bool | start () |
std::string | toString () const |
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] |
Use this class to execute a command line in a SoftwareContainer.
Definition at line 29 of file commandjob.h.
|
inherited |
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.
|
inherited |
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.
|
inherited |
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.