From 87a65e63bac789bca0607e0b4ab09d62517b95e7 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Wed, 29 May 2019 10:29:58 -0700 Subject: Update to internal Signed-off-by: Ed Tanous --- ...the-read-pipe-after-_read_error-completes.patch | 45 ---------------------- .../boost/boost/0001-Fix-Issue-62.patch | 28 ++++++++++++++ .../recipes-support/boost/boost_%.bbappend | 2 +- 3 files changed, 29 insertions(+), 46 deletions(-) delete mode 100644 meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Close-the-read-pipe-after-_read_error-completes.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Fix-Issue-62.patch (limited to 'meta-openbmc-mods/meta-common/recipes-support') diff --git a/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Close-the-read-pipe-after-_read_error-completes.patch b/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Close-the-read-pipe-after-_read_error-completes.patch deleted file mode 100644 index 80b1084ad..000000000 --- a/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Close-the-read-pipe-after-_read_error-completes.patch +++ /dev/null @@ -1,45 +0,0 @@ -From a035b099050e0f6e953001ce5b7f415043a12ec6 Mon Sep 17 00:00:00 2001 -From: "Jason M. Bills" -Date: Wed, 20 Mar 2019 18:20:12 -0700 -Subject: [PATCH] Close the read pipe after _read_error() completes - -There are exit conditions in _read_error() where the pipe does -not get closed resulting in a file descriptor leak in the -parent process after the child exits. - -This change moves the responsibility to close the pipe out of -_read_error() to the caller of _read_error() which aligns -with the behavior of _write_error(). - -Signed-off-by: Jason M. Bills ---- - boost/process/detail/posix/executor.hpp | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/boost/process/detail/posix/executor.hpp b/boost/process/detail/posix/executor.hpp -index 1390a58..661fbc5 100644 ---- a/boost/process/detail/posix/executor.hpp -+++ b/boost/process/detail/posix/executor.hpp -@@ -296,11 +296,9 @@ class executor - //EAGAIN not yet forked, EINTR interrupted, i.e. try again - else if ((err != EAGAIN ) && (err != EINTR)) - { -- ::close(source); - set_error(std::error_code(err, std::system_category()), "Error read pipe"); - } - } -- ::close(source); - set_error(ec, std::move(msg)); - } - -@@ -429,6 +427,7 @@ child executor::invoke(boost::mpl::false_, boost::mpl::false_) - - ::close(p[1]); - _read_error(p[0]); -+ ::close(p[0]); - - if (_ec) - { --- -2.7.4 - diff --git a/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Fix-Issue-62.patch b/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Fix-Issue-62.patch new file mode 100644 index 000000000..80dfc2725 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Fix-Issue-62.patch @@ -0,0 +1,28 @@ +From 318439af2e77731ae2c3df5e198c1d3e8392d556 Mon Sep 17 00:00:00 2001 +From: Simon Ebner +Date: Fri, 22 Mar 2019 15:27:35 +0100 +Subject: [PATCH 1/2] Fix Issue 62 + +Fixes a leaking pipe. See https://github.com/boostorg/process/issues/62 +--- + boost/process/detail/posix/executor.hpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/boost/process/detail/posix/executor.hpp b/boost/process/detail/posix/executor.hpp +index 1390a58..8b86ed1 100644 +--- a/boost/process/detail/posix/executor.hpp ++++ b/boost/process/detail/posix/executor.hpp +@@ -282,7 +282,10 @@ class executor + set_error(std::error_code(err, std::system_category()), "Error read pipe"); + } + if (count == 0) ++ { ++ ::close(source); + return ; ++ } + + std::error_code ec(data[0], std::system_category()); + std::string msg(data[1], ' '); +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend b/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend index d42d7ff6d..f85e30b1f 100644 --- a/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend @@ -1,3 +1,3 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI += "file://0001-Close-the-read-pipe-after-_read_error-completes.patch" +SRC_URI += "file://0001-Fix-Issue-62.patch" -- cgit v1.2.3