#include <sbuild-run-parts.h>
Collaboration diagram for sbuild::run_parts:
Public Types | |
typedef custom_error< error_code > | error |
Exception type. | |
CHILD_FORK | |
Failed to fork child. | |
CHILD_WAIT | |
Wait for child failed. | |
EXEC | |
Failed to execute. | |
enum | error_code { CHILD_FORK, CHILD_WAIT, EXEC } |
Error codes. More... | |
Public Member Functions | |
run_parts (std::string const &directory, bool lsb_mode=true, bool abort_on_error=true, mode_t umask=022) | |
The constructor. | |
~run_parts () | |
The destructor. | |
bool | get_verbose () const |
Get the verbosity level. | |
void | set_verbose (bool verbose) |
Set the verbosity level. | |
bool | get_reverse () const |
Get the script execution order. | |
void | set_reverse (bool reverse) |
Set the script execution order. | |
int | run (string_list const &command, environment const &env) |
Private Types | |
typedef std::set< std::string > | program_set |
Private Member Functions | |
int | run_child (std::string const &file, string_list const &command, environment const &env) |
void | wait_for_child (pid_t pid, int &child_status) |
bool | check_filename (std::string const &name) |
Private Attributes | |
bool | lsb_mode |
bool | abort_on_error |
mode_t | umask |
bool | verbose |
bool | reverse |
std::string | directory |
program_set | programs |
Friends | |
template<class charT, class traits> | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &stream, run_parts const &rhs) |
Output the environment to an ostream. |
Exception type.
typedef std::set<std::string> sbuild::run_parts::program_set [private] |
run_parts::run_parts | ( | std::string const & | directory, | |
bool | lsb_mode = true , |
|||
bool | abort_on_error = true , |
|||
mode_t | umask = 022 | |||
) |
The constructor.
run_parts::~run_parts | ( | ) |
The destructor.
bool run_parts::check_filename | ( | std::string const & | name | ) | [private] |
bool run_parts::get_reverse | ( | ) | const |
Get the script execution order.
bool run_parts::get_verbose | ( | ) | const |
Get the verbosity level.
int run_parts::run | ( | string_list const & | command, | |
environment const & | env | |||
) |
int run_parts::run_child | ( | std::string const & | file, | |
string_list const & | command, | |||
environment const & | env | |||
) | [private] |
void run_parts::set_reverse | ( | bool | reverse | ) |
Set the script execution order.
reverse | true to execute in reverse, otherwise false. |
void run_parts::set_verbose | ( | bool | verbose | ) |
Set the verbosity level.
verbose | true to be verbose, otherwise false. |
void run_parts::wait_for_child | ( | pid_t | pid, | |
int & | child_status | |||
) | [private] |
std::basic_ostream<charT,traits>& operator<< | ( | std::basic_ostream< charT, traits > & | stream, | |
run_parts const & | rhs | |||
) | [friend] |
Output the environment to an ostream.
stream | the stream to output to. | |
rhs | the environment to output. |
bool sbuild::run_parts::abort_on_error [private] |
std::string sbuild::run_parts::directory [private] |
bool sbuild::run_parts::lsb_mode [private] |
program_set sbuild::run_parts::programs [private] |
bool sbuild::run_parts::reverse [private] |
mode_t sbuild::run_parts::umask [private] |
bool sbuild::run_parts::verbose [private] |