#include "blocxx/BLOCXX_config.h"#include "blocxx/Exec.hpp"#include "blocxx/CommonFwd.hpp"#include "blocxx/EnvVars.hpp"#include "blocxx/Exception.hpp"#include "blocxx/Types.hpp"#include "blocxx/IntrusiveCountableBase.hpp"#include "blocxx/Cstr.hpp"#include "blocxx/Timeout.hpp"#include <vector>#include "blocxx/Array.hpp"#include "blocxx/IntrusiveReference.hpp"#include <signal.h>#include "blocxx/ExceptionIds.hpp"#include "blocxx/TimeoutTimer.hpp"#include "blocxx/Process.hpp"#include "blocxx/GlobalPtr.hpp"#include "ThreadTypes.hpp"#include "blocxx/AutoDescriptor.hpp"#include "blocxx/NetworkTypes.hpp"#include "blocxx/Exec.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 | |
| 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 |
| String& m_erroutput |
| int m_outputLimit |
1.6.3