diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-support')
2 files changed, 48 insertions, 0 deletions
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 new file mode 100644 index 000000000..80b1084ad --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-support/boost/boost/0001-Close-the-read-pipe-after-_read_error-completes.patch @@ -0,0 +1,45 @@ +From a035b099050e0f6e953001ce5b7f415043a12ec6 Mon Sep 17 00:00:00 2001 +From: "Jason M. Bills" <jason.m.bills@linux.intel.com> +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 <jason.m.bills@linux.intel.com> +--- + 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<Sequence>::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_%.bbappend b/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend new file mode 100644 index 000000000..d42d7ff6d --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-support/boost/boost_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-Close-the-read-pipe-after-_read_error-completes.patch" |