Ninja
|
SubprocessSet runs a ppoll/pselect() loop around a set of Subprocesses. More...
#include <subprocess.h>
Public Member Functions | |
Subprocess * | Add (const string &command) |
void | Clear () |
bool | DoWork () |
Subprocess * | NextFinished () |
SubprocessSet () | |
~SubprocessSet () | |
Static Public Member Functions | |
static void | SetInterruptedFlag (int signum) |
Public Attributes | |
queue< Subprocess * > | finished_ |
struct sigaction | old_act_ |
sigset_t | old_mask_ |
vector< Subprocess * > | running_ |
Static Public Attributes | |
static bool | interrupted_ |
SubprocessSet runs a ppoll/pselect() loop around a set of Subprocesses.
DoWork() waits for any state change in subprocesses; finished_ is a queue of subprocesses as they finish.
Definition at line 74 of file subprocess.h.
SubprocessSet::SubprocessSet | ( | ) |
Definition at line 148 of file subprocess-posix.cc.
References Fatal(), old_act_, old_mask_, and SetInterruptedFlag().
SubprocessSet::~SubprocessSet | ( | ) |
Subprocess * SubprocessSet::Add | ( | const string & | command | ) |
Definition at line 171 of file subprocess-posix.cc.
References running_, and Subprocess::Start().
Referenced by RealCommandRunner::StartCommand().
void SubprocessSet::Clear | ( | ) |
Definition at line 279 of file subprocess-posix.cc.
References running_.
Referenced by RealCommandRunner::Abort(), and ~SubprocessSet().
bool SubprocessSet::DoWork | ( | ) |
Definition at line 228 of file subprocess-posix.cc.
References finished_, interrupted_, old_mask_, and running_.
Referenced by RealCommandRunner::WaitForCommand().
Subprocess * SubprocessSet::NextFinished | ( | ) |
Definition at line 271 of file subprocess-posix.cc.
References finished_.
Referenced by RealCommandRunner::WaitForCommand().
|
static |
Definition at line 143 of file subprocess-posix.cc.
References interrupted_.
Referenced by SubprocessSet().
queue<Subprocess*> SubprocessSet::finished_ |
Definition at line 84 of file subprocess.h.
Referenced by DoWork(), and NextFinished().
|
static |
Definition at line 91 of file subprocess.h.
Referenced by DoWork(), and SetInterruptedFlag().
struct sigaction SubprocessSet::old_act_ |
Definition at line 93 of file subprocess.h.
Referenced by Subprocess::Start(), SubprocessSet(), and ~SubprocessSet().
sigset_t SubprocessSet::old_mask_ |
Definition at line 94 of file subprocess.h.
Referenced by DoWork(), Subprocess::Start(), SubprocessSet(), and ~SubprocessSet().
vector<Subprocess*> SubprocessSet::running_ |
Definition at line 83 of file subprocess.h.
Referenced by Add(), RealCommandRunner::CanRunMore(), Clear(), and DoWork().