Ninja
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
SubprocessSet Struct Reference

SubprocessSet runs a ppoll/pselect() loop around a set of Subprocesses. More...

#include <subprocess.h>

List of all members.

Public Member Functions

SubprocessAdd (const string &command)
void Clear ()
bool DoWork ()
SubprocessNextFinished ()
 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_

Detailed Description

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.


Constructor & Destructor Documentation

Definition at line 148 of file subprocess-posix.cc.

References Fatal(), old_act_, old_mask_, and SetInterruptedFlag().

Definition at line 162 of file subprocess-posix.cc.

References Clear(), Fatal(), old_act_, and old_mask_.


Member Function Documentation

Subprocess * SubprocessSet::Add ( const string &  command)

Definition at line 171 of file subprocess-posix.cc.

References running_, and Subprocess::Start().

Referenced by RealCommandRunner::StartCommand().

Definition at line 279 of file subprocess-posix.cc.

References running_.

Referenced by RealCommandRunner::Abort(), and ~SubprocessSet().

Definition at line 228 of file subprocess-posix.cc.

References finished_, interrupted_, old_mask_, and running_.

Referenced by RealCommandRunner::WaitForCommand().

Definition at line 271 of file subprocess-posix.cc.

References finished_.

Referenced by RealCommandRunner::WaitForCommand().

void SubprocessSet::SetInterruptedFlag ( int  signum) [static]

Definition at line 143 of file subprocess-posix.cc.

References interrupted_.

Referenced by SubprocessSet().


Member Data Documentation

Definition at line 84 of file subprocess.h.

Referenced by DoWork(), and NextFinished().

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 SubprocessSet(), and ~SubprocessSet().

Definition at line 94 of file subprocess.h.

Referenced by DoWork(), SubprocessSet(), and ~SubprocessSet().

Definition at line 83 of file subprocess.h.

Referenced by Add(), RealCommandRunner::CanRunMore(), Clear(), and DoWork().


The documentation for this struct was generated from the following files: