|
Ninja
|
SubprocessSet runs a ppoll/pselect() loop around a set of Subprocesses. More...
#include <subprocess.h>
Public Member Functions | |
| Subprocess * | Add (const std::string &command, bool use_console=false) |
| void | Clear () |
| bool | DoWork () |
| Subprocess * | NextFinished () |
| SubprocessSet () | |
| ~SubprocessSet () | |
Static Public Member Functions | |
| static void | HandlePendingInterruption () |
| static bool | IsInterrupted () |
| static void | SetInterruptedFlag (int signum) |
Public Attributes | |
| std::queue< Subprocess * > | finished_ |
| struct sigaction | old_hup_act_ |
| struct sigaction | old_int_act_ |
| sigset_t | old_mask_ |
| struct sigaction | old_term_act_ |
| std::vector< Subprocess * > | running_ |
Static Public Attributes | |
| static int | interrupted_ |
| Store the signal number that causes the interruption. More... | |
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 82 of file subprocess.h.
| SubprocessSet::SubprocessSet | ( | ) |
Definition at line 208 of file subprocess-posix.cc.
References Fatal(), old_hup_act_, old_int_act_, old_mask_, old_term_act_, and SetInterruptedFlag().
| SubprocessSet::~SubprocessSet | ( | ) |
Definition at line 228 of file subprocess-posix.cc.
References Clear(), Fatal(), old_hup_act_, old_int_act_, old_mask_, and old_term_act_.
| Subprocess * SubprocessSet::Add | ( | const std::string & | command, |
| bool | use_console = false |
||
| ) |
Definition at line 241 of file subprocess-posix.cc.
References running_, and Subprocess::Start().
Referenced by RealCommandRunner::StartCommand().
| void SubprocessSet::Clear | ( | ) |
Definition at line 357 of file subprocess-posix.cc.
References interrupted_, and running_.
Referenced by RealCommandRunner::Abort(), and ~SubprocessSet().
| bool SubprocessSet::DoWork | ( | ) |
Definition at line 302 of file subprocess-posix.cc.
References finished_, HandlePendingInterruption(), interrupted_, IsInterrupted(), old_mask_, and running_.
Referenced by RealCommandRunner::WaitForCommand().
|
static |
Definition at line 193 of file subprocess-posix.cc.
References interrupted_.
Referenced by DoWork().
|
inlinestatic |
| Subprocess * SubprocessSet::NextFinished | ( | ) |
Definition at line 349 of file subprocess-posix.cc.
References finished_.
Referenced by RealCommandRunner::WaitForCommand().
|
static |
Definition at line 189 of file subprocess-posix.cc.
References interrupted_.
Referenced by SubprocessSet().
| std::queue<Subprocess*> SubprocessSet::finished_ |
Definition at line 92 of file subprocess.h.
Referenced by RealCommandRunner::CanRunMore(), DoWork(), and NextFinished().
|
static |
Store the signal number that causes the interruption.
0 if not interruption.
Definition at line 102 of file subprocess.h.
Referenced by Clear(), DoWork(), HandlePendingInterruption(), IsInterrupted(), and SetInterruptedFlag().
| struct sigaction SubprocessSet::old_hup_act_ |
Definition at line 108 of file subprocess.h.
Referenced by SubprocessSet(), and ~SubprocessSet().
| struct sigaction SubprocessSet::old_int_act_ |
Definition at line 106 of file subprocess.h.
Referenced by SubprocessSet(), and ~SubprocessSet().
| sigset_t SubprocessSet::old_mask_ |
Definition at line 109 of file subprocess.h.
Referenced by DoWork(), SubprocessSet(), and ~SubprocessSet().
| struct sigaction SubprocessSet::old_term_act_ |
Definition at line 107 of file subprocess.h.
Referenced by SubprocessSet(), and ~SubprocessSet().
| std::vector<Subprocess*> SubprocessSet::running_ |
Definition at line 91 of file subprocess.h.
Referenced by Add(), RealCommandRunner::CanRunMore(), Clear(), and DoWork().
1.8.14