commit | 595172d1e6671246d2fa02d371664221b3878b4a | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Mon Dec 10 17:20:41 2018 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Dec 10 17:20:41 2018 +0000 |
tree | c3ea4eddbdd3aec67a3c51ebda0e9ab2c5498639 | |
parent | b1166633b69e0277cfe2d8ffe1413684c4798bf1 [diff] | |
parent | e6ba0cc34a63c2c17840a642f2c181dcd3ce214d [diff] |
Merge "DO NOT MERGE"
diff --git a/Utils.cpp b/Utils.cpp index 3bbdf3a..a77b1b6 100644 --- a/Utils.cpp +++ b/Utils.cpp
@@ -312,7 +312,10 @@ } } pipe_read.reset(); - dup2(pipe_write.get(), STDOUT_FILENO); + if (dup2(pipe_write.get(), STDOUT_FILENO) == -1) { + PLOG(ERROR) << "dup2 in ForkExecvp"; + _exit(EXIT_FAILURE); + } pipe_write.reset(); execvp(argv[0], const_cast<char**>(argv.data())); PLOG(ERROR) << "exec in ForkExecvp";