From e8ecce7f456536f9bff788dbce949153badddbc2 Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Mon, 23 Apr 2012 15:00:32 -0700 Subject: Forgot to close pipe -- Bug fix. Also, change to use PLOG. Change-Id: I16653bb036881ab5c50ae2afa60f246b99febb5c --- src/compiler_llvm/compilation_unit.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/compiler_llvm/compilation_unit.cc') diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc index 909248594a..ccad0f46b1 100644 --- a/src/compiler_llvm/compilation_unit.cc +++ b/src/compiler_llvm/compilation_unit.cc @@ -172,7 +172,7 @@ bool CompilationUnit::Materialize() { // 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 @@ bool CompilationUnit::Materialize() { } } + close(pipe_fd[0]); + // Wait for child to finish int status; pid_t got_pid = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0)); -- cgit v1.2.3-59-g8ed1b