From 2be6cc918b5d3138dd6e0c9eaccbc1dbcc814bef Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 14 Mar 2015 01:53:17 +0000 Subject: [PATCH] Avoid stdout/stderr as variable names --- src/shell_manager.cc | 12 ++++++------ 1 file 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 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 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 {