update boost
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// detail/impl/pipe_select_interrupter.ipp
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
||||
// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -102,12 +102,17 @@ bool pipe_select_interrupter::reset()
|
||||
{
|
||||
char data[1024];
|
||||
signed_size_type bytes_read = ::read(read_descriptor_, data, sizeof(data));
|
||||
if (bytes_read < 0 && errno == EINTR)
|
||||
if (bytes_read == sizeof(data))
|
||||
continue;
|
||||
bool was_interrupted = (bytes_read > 0);
|
||||
while (bytes_read == sizeof(data))
|
||||
bytes_read = ::read(read_descriptor_, data, sizeof(data));
|
||||
return was_interrupted;
|
||||
if (bytes_read > 0)
|
||||
return true;
|
||||
if (bytes_read == 0)
|
||||
return false;
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
if (errno == EWOULDBLOCK || errno == EAGAIN)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user