Forgot to close pipe -- Bug fix. Also, change to use PLOG.
Change-Id: I16653bb036881ab5c50ae2afa60f246b99febb5c
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc
index 9092485..ccad0f4 100644
--- a/src/compiler_llvm/compilation_unit.cc
+++ b/src/compiler_llvm/compilation_unit.cc
@@ -172,7 +172,7 @@
// Prepare the pipe between parent process and child process
int pipe_fd[2];
if (pipe(pipe_fd) == -1) {
- LOG(FATAL) << "Failed to create pipe for CompilerWorker";
+ PLOG(FATAL) << "Failed to create pipe for CompilerWorker";
return false;
}
@@ -226,6 +226,8 @@
}
}
+ close(pipe_fd[0]);
+
// Wait for child to finish
int status;
pid_t got_pid = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));