diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:12:59 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:12:59 +0900 |
commit | b8cf34c691623e4ec329053cbbf68522a855882d (patch) | |
tree | 34da08632a99677f6b79ecb65e5b655a5b69a67f /boost/process/detail/posix/async_in.hpp | |
parent | 3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff) | |
download | boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.gz boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.bz2 boost-b8cf34c691623e4ec329053cbbf68522a855882d.zip |
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boost/process/detail/posix/async_in.hpp')
-rw-r--r-- | boost/process/detail/posix/async_in.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/boost/process/detail/posix/async_in.hpp b/boost/process/detail/posix/async_in.hpp index 1c1e2f40fb..7e9fb94ebd 100644 --- a/boost/process/detail/posix/async_in.hpp +++ b/boost/process/detail/posix/async_in.hpp @@ -85,7 +85,9 @@ struct async_in_buffer : ::boost::process::detail::posix::handler_base_ext, if (::dup2(pipe->native_source(), STDIN_FILENO) == -1) exec.set_error(::boost::process::detail::get_last_error(), "dup2() failed"); - ::close(pipe->native_source()); + if (pipe->native_source() != STDIN_FILENO) + ::close(pipe->native_source()); + ::close(pipe->native_sink()); } }; |