• Martin Möhrmann's avatar
    os: remove incorrect detection of O_CLOEXEC flag on darwin · 6ef92b6e
    Martin Möhrmann authored
    The below range loop will not stop when encountering
    the first '.' character in a Darwin version string like "15.6.0".
    
    for i = range osver {
       if osver[i] != '.' {
             continue
          }
       }
    }
    
    Therefore, the condition i > 2 was always satisfied and
    supportsCloseOnExec was always set to true.
    
    Since the minimum supported version of OSX for go is currently 10.8
    and O_CLOEXEC is implemented from OSX 10.7 on the detection code
    can be removed and support for O_CLOEXEC is always assumed to exist.
    
    Change-Id: Idd10094d8385dd4adebc8d7a6d9e9a8f29455867
    Reviewed-on: https://go-review.googlesource.com/37193Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    6ef92b6e
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...