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

Replace _chsize_s with SetEndOfFile on Windows

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

    Description

      The function os::ftruncate on Windows uses the CRT API _chsize_s which requires an integer file descriptor. We can replace this with the semantically similar if not equivalent logic of SetFilePointer followed by SetEndOfFile. Major different is that it doesn't write null bytes when extending the file; it leaves the data uninitialized.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          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:

              Slack

                Issue deployment