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

os::open doesn't always atomically apply O_CLOEXEC

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0
    • stout

    Description

      In r/39180, the os/open.hpp header was refactored so that it conditionally includes fcntl.h. However fcntl.h is required to make the O_CLOEXEC symbol visible, so it is quite likely that O_CLOEXEC_UNDEFINED will be defined even on systems that do actually support O_CLOEXEC. This causes os::open to fall back to the non-atomic open+fcntl sequence, which can leak file descriptors into child processes.

      Attachments

        Issue Links

          Activity

            People

              jamespeach James Peach
              jamespeach James Peach
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: