blocxx
|
#include "blocxx/BLOCXX_config.h"
#include "blocxx/Exec.hpp"
#include "blocxx/Select.hpp"
#include "blocxx/ExceptionIds.hpp"
#include "blocxx/TimeoutTimer.hpp"
#include "blocxx/ExecMockObject.hpp"
#include "blocxx/GlobalPtr.hpp"
#include "blocxx/WaitpidThreadFix.hpp"
#include "blocxx/PosixUnnamedPipe.hpp"
#include "blocxx/PosixExec.hpp"
#include <sys/wait.h>
#include <fcntl.h>
Go to the source code of this file.
Namespaces | |
namespace | BLOCXX_NAMESPACE |
Taken from RFC 1321. | |
namespace | BLOCXX_NAMESPACE::Exec |
namespace | BLOCXX_NAMESPACE::Exec::Impl |
Defines | |
#define | BLOCXX_MIN(x, y) (x) < (y) ? (x) : (y) |
Functions | |
usr src packages BUILD blocxx src blocxx Exec cpp usr src packages BUILD blocxx src blocxx Exec cpp usr src packages BUILD blocxx src blocxx Exec cpp usr src packages BUILD blocxx src blocxx Exec cpp usr src packages BUILD blocxx src blocxx Exec cpp usr src packages BUILD blocxx src blocxx Exec cpp | BLOCXX_NAMESPACE::BLOCXX_DEFINE_EXCEPTION_WITH_BASE_AND_ID (ExecTimeout, ExecErrorException) |
BLOCXX_NAMESPACE::BLOCXX_DEFINE_EXCEPTION_WITH_BASE_AND_ID (ExecBufferFull, ExecErrorException) | |
BLOCXX_NAMESPACE::BLOCXX_DEFINE_EXCEPTION_WITH_ID (ExecError) | |
Process::Status | BLOCXX_NAMESPACE::Exec::system (const Array< String > &command, const char *const envp[]=0, const Timeout &=Timeout::infinite) |
Execute a command. | |
int | BLOCXX_NAMESPACE::Exec::safeSystem (const Array< String > &command, const char *const envp[]=0) BLOCXX_DEPRECATED |
This is deprecated. | |
ProcessRef | BLOCXX_NAMESPACE::Exec::spawnImpl (char const *exec_path, char const *const argv[], char const *const envp[], PreExec &pre_exec) |
ProcessRef | BLOCXX_NAMESPACE::Exec::spawn (char const *exec_path, char const *const argv[], char const *const envp[], PreExec &pre_exec) |
Run the executable exec_path in a child process, with argv for the program arguments and envp for the environment. | |
ProcessRef | BLOCXX_NAMESPACE::Exec::spawn (char const *const argv[], char const *const envp[]) |
Variant of spawn that uses StandardPreExec . | |
void | BLOCXX_NAMESPACE::Exec::Impl::close_child_ends (UnnamedPipeRef ppipe[BLOCXX_NPIPE]) |
Process::Status | BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput (char const *const command[], String &output, char const *const envVars[], const Timeout &timeout=Timeout::infinite, int outputlimit=-1, char const *input=0) |
Execute a command and run feedProcessAndGatherOutput() on the process. | |
Process::Status | BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput (char const *const command[], String &output, String &erroutput, char const *const envVars[], const Timeout &timeout=Timeout::infinite, int outputLimit=-1, char const *input=0) |
Execute a command and run feedProcessAndGatherOutput() on the process. | |
BLOCXX_COMMON_API void | BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput (const Array< String > &command, String &output, int &processstatus, int timeoutsecs, int outputlimit, const String &input) |
Process::Status | BLOCXX_NAMESPACE::Exec::feedProcessAndGatherOutput (ProcessRef const &proc, String &output, Timeout const &timeout=Timeout::infinite, int outputlimit=-1, String const &input=String()) |
Send input to a process, collect the output, and wait for it to exit. | |
Process::Status | BLOCXX_NAMESPACE::Exec::feedProcessAndGatherOutput (ProcessRef const &proc, String &output, String &erroutput, Timeout const &timeout=Timeout::infinite, int outputLimit=-1, String const &input=String()) |
Send input to a process, collect STDOUT and STDERR, and wait for it to exit. | |
void | BLOCXX_NAMESPACE::Exec::gatherOutput (String &output, const ProcessRef &proc, int timeoutSecs, int outputLimit) |
void | BLOCXX_NAMESPACE::Exec::gatherOutput (String &output, const ProcessRef &proc, const Timeout &timeout=Timeout::infinite, int outputlimit=-1) |
Wait for output from a child process. | |
void | BLOCXX_NAMESPACE::Exec::processInputOutput (OutputCallback &output, Array< ProcessRef > &procs, InputCallback &input, const Timeout &timeout=Timeout::infinite) |
Send input and wait for output from child processes. | |
void | BLOCXX_NAMESPACE::Exec::processInputOutput (const String &input, String &output, const ProcessRef &process, const Timeout &timeout, int outputLimit) |
Variables | |
::BLOCXX_NAMESPACE::GlobalPtr < ExecMockObject, Impl::NullFactory > | BLOCXX_NAMESPACE::Exec::g_execMockObject = BLOCXX_GLOBAL_PTR_INIT |
size_t availableDataLen |
Definition at line 403 of file Exec.cpp.
Referenced by BLOCXX_NAMESPACE::Exec::InputCallback::getData().
bool errIsOpen |
Definition at line 402 of file Exec.cpp.
Referenced by BLOCXX_NAMESPACE::Exec::InputCallback::getData().
bool inIsOpen |
Definition at line 400 of file Exec.cpp.
Referenced by BLOCXX_NAMESPACE::Exec::InputCallback::getData().
String& m_erroutput |
int m_outputLimit |
bool outIsOpen |
Definition at line 401 of file Exec.cpp.
Referenced by BLOCXX_NAMESPACE::Exec::InputCallback::getData().