Ticket #4913: file_descriptor.patch

File file_descriptor.patch, 665 bytes (added by Todor Buyukliev <todor@…>, 12 years ago)
  • file_descriptor.cpp

    old new  
    267267    return result == 0 ? -1 : static_cast<std::streamsize>(result);
    268268#else // #ifdef BOOST_IOSTREAMS_WINDOWS
    269269    errno = 0;
    270     std::streamsize result = BOOST_IOSTREAMS_FD_READ(handle_, s, n);
    271     if (errno != 0)
     270    std::streamsize result = 0;
     271    do {
     272        result = BOOST_IOSTREAMS_FD_READ(handle_, s, n);
     273    } while (result == -1L && errno == EINTR);
     274    if (result == -1L)
    272275        throw_system_failure("failed reading");
    273276    return result == 0 ? -1 : result;
    274277#endif // #ifdef BOOST_IOSTREAMS_WINDOWS