summaryrefslogtreecommitdiffstats
path: root/src/subprocess.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/subprocess.h')
-rw-r--r--src/subprocess.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/subprocess.h b/src/subprocess.h
index 4c1629c..6ea6f62 100644
--- a/src/subprocess.h
+++ b/src/subprocess.h
@@ -44,13 +44,14 @@ struct Subprocess {
const string& GetOutput() const;
private:
- Subprocess();
bool Start(struct SubprocessSet* set, const string& command);
void OnPipeReady();
string buf_;
#ifdef _WIN32
+ Subprocess();
+
/// Set up pipe_ as the parent-side pipe of the subprocess; return the
/// other end of the pipe, usable in the child process.
HANDLE SetupPipe(HANDLE ioport);
@@ -61,9 +62,12 @@ struct Subprocess {
char overlapped_buf_[4 << 10];
bool is_reading_;
#else
+ Subprocess(bool use_console);
+
int fd_;
pid_t pid_;
#endif
+ bool use_console_;
friend struct SubprocessSet;
};
@@ -75,7 +79,7 @@ struct SubprocessSet {
SubprocessSet();
~SubprocessSet();
- Subprocess* Add(const string& command);
+ Subprocess* Add(const string& command, bool use_console = false);
bool DoWork();
Subprocess* NextFinished();
void Clear();