Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8676

Fix os::read and os::write to use HANDLES

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None

    Description

      When fixing os::open to open real Windows HANDLE s to files in a default overlapped mode, we'll need to fix os::read and os::write to work with these. Since these functions are inherently synchronous, we'll just use overlapped I/O but wait for completion, making the action synchronous.

      Caveat: when files on Windows are opened in overlapped mode, they no longer retain state about the offset. Because these functions currently use the CRT APIs _read and _write, they act like POSIX file descriptors which are advanced by N bytes per read and write. We can mimic this behavior by saving the offset state in the WindowsFD abstraction.

      Also fix use of WSAGetLastError since not all reads/writes are on sockets. See MESOS-8861

      Attachments

        Issue Links

          Activity

            People

              andschwa Andrew Schwartzmeyer
              andschwa Andrew Schwartzmeyer
              Andrew Schwartzmeyer Andrew Schwartzmeyer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: