From c949ab72e4f9c72d38857ba86223bc828214e388 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 10 Mar 2016 19:40:20 +0000 Subject: [PATCH] Close read end of pipe after reading in gdb stack trace mode. --- src/os/unix/crashlog_unix.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os/unix/crashlog_unix.cpp b/src/os/unix/crashlog_unix.cpp index 175eb7c534..d8f95908b4 100644 --- a/src/os/unix/crashlog_unix.cpp +++ b/src/os/unix/crashlog_unix.cpp @@ -206,6 +206,8 @@ class CrashLogUnix : public CrashLog { } buffer += seprintf(buffer, last, "\n"); + close(pipefd[0]); /* close read end */ + int status; int wait_ret = waitpid(pid, &status, 0); if (wait_ret == -1 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {