summaryrefslogtreecommitdiff
path: root/src/shell_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-03-14 01:53:17 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-03-14 01:53:17 +0000
commit2be6cc918b5d3138dd6e0c9eaccbc1dbcc814bef (patch)
tree0004952a87f0fed92a7cd084a59ea52d1db2dca8 /src/shell_manager.cc
parent09e2a0b6ac1f3e1b295380ef5af23d370ccf5d53 (diff)
Avoid stdout/stderr as variable names
Diffstat (limited to 'src/shell_manager.cc')
-rw-r--r--src/shell_manager.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc
index 4dcb7eef..cf7d6cf3 100644
--- a/src/shell_manager.cc
+++ b/src/shell_manager.cc
@@ -47,7 +47,7 @@ std::pair<String, int> ShellManager::eval(
write(write_pipe[1], input.data(), (int)input.length());
close(write_pipe[1]);
- String stdout, stderr;
+ String child_stdout, child_stderr;
{
auto pipe_reader = [](String& output) {
return [&output](FDWatcher& watcher, EventMode) {
@@ -59,19 +59,19 @@ std::pair<String, int> ShellManager::eval(
};
};
- FDWatcher stdout_watcher{read_pipe[0], pipe_reader(stdout)};
- FDWatcher stderr_watcher{error_pipe[0], pipe_reader(stderr)};
+ FDWatcher stdout_watcher{read_pipe[0], pipe_reader(child_stdout)};
+ FDWatcher stderr_watcher{error_pipe[0], pipe_reader(child_stderr)};
while (not stdout_watcher.closed() or not stderr_watcher.closed())
EventManager::instance().handle_next_events(EventMode::Urgent);
}
- if (not stderr.empty())
- write_debug("shell stderr: <<<\n" + stderr + ">>>");
+ if (not child_stderr.empty())
+ write_debug("shell stderr: <<<\n" + child_stderr + ">>>");
int status = 0;
waitpid(pid, &status, 0);
- return { stdout, WIFEXITED(status) ? WEXITSTATUS(status) : - 1 };
+ return { child_stdout, WIFEXITED(status) ? WEXITSTATUS(status) : - 1 };
}
else try
{