Ninja
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SubprocessSet Struct Reference

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

#include <subprocess.h>

Public Member Functions

SubprocessAdd (const string &command, bool use_console=false)
 
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 75 of file subprocess.h.

Constructor & Destructor Documentation

SubprocessSet::SubprocessSet ( )

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

References Fatal().

SubprocessSet::~SubprocessSet ( )

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

References Fatal().

Member Function Documentation

Subprocess * SubprocessSet::Add ( const string &  command,
bool  use_console = false 
)

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

References DoWork(), Subprocess::Start(), and Subprocess::Subprocess().

void SubprocessSet::Clear ( )

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

bool SubprocessSet::DoWork ( )

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

Referenced by Add().

Subprocess * SubprocessSet::NextFinished ( )

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

void SubprocessSet::SetInterruptedFlag ( int  signum)
static

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

Member Data Documentation

queue<Subprocess*> SubprocessSet::finished_

Definition at line 85 of file subprocess.h.

bool SubprocessSet::interrupted_
static

Definition at line 92 of file subprocess.h.

Referenced by Subprocess::GetOutput().

struct sigaction SubprocessSet::old_act_

Definition at line 94 of file subprocess.h.

sigset_t SubprocessSet::old_mask_

Definition at line 95 of file subprocess.h.

vector<Subprocess*> SubprocessSet::running_

Definition at line 84 of file subprocess.h.


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