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

`os::cloexec` does not exist on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None
    • Mesosphere Sprint 74, Mesosphere Sprint 75
    • 2

    Description

      `os::cloexec` does not work on Windows. It will never work at the OS level. Because of this, there are likely many important and hard-to-detect bugs hanging around the agent.

      This is extremely important to fix. Some possible solutions to investigate (some of which are extremely risky):

      • Abstract out file descriptors into a class, implement cloexec in that class on Windows (since we can't rely on the OS to do it).
      • Refactor all the code that relies on `os::cloexec` to not rely on it.

      Of the two, the first seems less risky in the short term, because the cloexec code only affects Windows. Depending on the semantics of the implementation of the `FileDescriptor` class, it is possible that this is riskier to Windows in the longer term, as the semantics of `cloexec` may have subtle difference between Linux and Windows.

      Attachments

        Issue Links

          Activity

            People

              andschwa Andrew Schwartzmeyer
              andschwa Andrew Schwartzmeyer
              Joseph Wu Joseph Wu
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: