Exec.cpp File Reference

#include "blocxx/BLOCXX_config.h"
#include "blocxx/Exec.hpp"
#include "blocxx/Format.hpp"
#include "blocxx/Assertion.hpp"
#include "blocxx/PosixUnnamedPipe.hpp"
#include "blocxx/Array.hpp"
#include "blocxx/IOException.hpp"
#include "blocxx/Thread.hpp"
#include "blocxx/Select.hpp"
#include "blocxx/ExceptionIds.hpp"
#include "blocxx/IntrusiveCountableBase.hpp"
#include "blocxx/DateTime.hpp"
#include "blocxx/AutoPtr.hpp"
#include <map>
#include <sys/resource.h>
#include <unistd.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <signal.h>
#include <cerrno>
#include <iostream>

Go to the source code of this file.

Namespaces

namespace  BLOCXX_NAMESPACE
namespace  BLOCXX_NAMESPACE::Exec

Classes

class  BLOCXX_NAMESPACE::PopenStreamsImpl

Defines

#define NSIG   64
#define BLOCXX_MIN(x, y)   (x) < (y) ? (x) : (y)

Functions

static ProcId BLOCXX_NAMESPACE::safeWaitPid (ProcId pid, int *status, int options)
static ProcId BLOCXX_NAMESPACE::noIntrWaitPid (ProcId pid, int *status, int options)
static void BLOCXX_NAMESPACE::milliSleep (UInt32 milliSeconds)
static void BLOCXX_NAMESPACE::secSleep (UInt32 seconds)
static bool BLOCXX_NAMESPACE::timedWaitPid (ProcId pid, int *pstatus, UInt32 wait_time)
static bool BLOCXX_NAMESPACE::killWait (ProcId pid, int *pstatus, UInt32 wait_time, int sig, char const *signame)
bool BLOCXX_NAMESPACE::operator== (const PopenStreams &x, const PopenStreams &y)
int BLOCXX_NAMESPACE::Exec::safeSystem (const Array< String > &command, const EnvVars &envVars)
 Execute a command.
int BLOCXX_NAMESPACE::Exec::safeSystem (const Array< String > &command, const char *const envp[]=0)
 Execute a command.
PopenStreams BLOCXX_NAMESPACE::Exec::safePopen (const Array< String > &command, const String &initialInput)
 The use of initialInput is deprecated, because it's not safe to use it in a portable manner.
PopenStreams BLOCXX_NAMESPACE::Exec::safePopen (const Array< String > &command, const EnvVars &envVars)
 Execute a command.
PopenStreams BLOCXX_NAMESPACE::Exec::safePopen (const Array< String > &command, const char *const envp[]=0)
 Execute a command.
void BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput (const Array< String > &command, String &output, int &processstatus, int timeoutsecs=INFINITE_TIMEOUT, int outputlimit=-1, const String &input=String())
 Run a process using current process's environment, collect the output, and wait for it to exit.
void BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput (const Array< String > &command, String &output, int &processstatus, const EnvVars &envVars, int timeoutsecs=INFINITE_TIMEOUT, int outputlimit=-1, const String &input=String())
 Run a process, collect the output, and wait for it to exit.
void BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput (const Array< String > &command, String &stdOutput, String &errOutput, int &processstatus, const EnvVars &envVars, int timeoutsecs=INFINITE_TIMEOUT, int outputlimit=-1, const String &input=String())
 Run a process, collect the standard output and standard error outputs separately, and wait for it to exit.
void BLOCXX_NAMESPACE::Exec::gatherOutput (String &output, PopenStreams &streams, int &processstatus, int timeoutsecs=INFINITE_TIMEOUT, int outputlimit=-1)
 Wait for output from a child process.
void BLOCXX_NAMESPACE::Exec::processInputOutput (OutputCallback &output, Array< PopenStreams > &streams, Array< ProcessStatus > &processStatuses, InputCallback &input, int timeoutSecs=INFINITE_TIMEOUT)
 Send input and wait for output from child processes.

Variables

String & m_stdout
String & m_stderr
int m_outputLimit
String m_s
bool inIsOpen
bool outIsOpen
bool errIsOpen
size_t availableDataLen


Define Documentation

#define BLOCXX_MIN x,
 )     (x) < (y) ? (x) : (y)
 

Definition at line 789 of file Exec.cpp.

#define NSIG   64
 

Author:
Dan Nuffer

Definition at line 72 of file Exec.cpp.


Variable Documentation

size_t availableDataLen
 

Definition at line 978 of file Exec.cpp.

bool errIsOpen
 

Definition at line 977 of file Exec.cpp.

bool inIsOpen
 

Definition at line 975 of file Exec.cpp.

int m_outputLimit
 

Definition at line 828 of file Exec.cpp.

String m_s
 

Definition at line 852 of file Exec.cpp.

String& m_stderr
 

Definition at line 827 of file Exec.cpp.

String& m_stdout
 

Definition at line 826 of file Exec.cpp.

bool outIsOpen
 

Definition at line 976 of file Exec.cpp.


Generated on Fri Jun 16 15:39:09 2006 for blocxx by  doxygen 1.4.6