VirtualBox

Changeset 65958 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Mar 6, 2017 9:10:38 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113783
Message:

common/utils.py: Figured out how to do openNoInherit on Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/utils.py

    r65956 r65958  
    238238        from fcntl import FD_CLOEXEC, F_GETFD, F_SETFD, fcntl; # pylint: disable=F0401
    239239    except:
     240        # On windows, use the 'N' flag introduces in Visual C++ 7.0 or 7.1.
     241        if getHostOs() == 'win':
     242            offComma = sMode.find(',');
     243            if offComma < 0:
     244                return open(sFile, sMode + 'N');
     245            return open(sFile, sMode[:offComma] + 'N' + sMode[offComma:]);
     246        # Just in case.
    240247        return open(sFile, sMode);
    241248
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette