Skip to content

Commit 0c42a58

Browse files
klemens-morgensternKlemens Morgenstern
authored andcommitted
~pipe_buf catches exceptions from overflow
Closes #111
1 parent f269236 commit 0c42a58

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/boost/process/pipe.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,14 @@ struct basic_pipebuf : std::basic_streambuf<CharT, Traits>
122122

123123
///Destructor -> writes the frest of the data
124124
~basic_pipebuf()
125+
try
125126
{
126127
if (basic_pipebuf::is_open())
127128
basic_pipebuf::overflow(Traits::eof());
128129
}
130+
catch (process_error & )
131+
{
132+
}
129133

130134
///Move construct from a pipe.
131135
basic_pipebuf(pipe_type && p) : _pipe(std::move(p)),

0 commit comments

Comments
 (0)