Merge "Typo fix in comment. O_CLOEXEC is e, not x." am: fe88d26aca
am: 82ed244032
am: 169df88962
Change-Id: I7bcac6d3c2e6d64819f181e507f2bc45dc6274e7
This commit is contained in:
commit
0650d04668
1 changed files with 1 additions and 1 deletions
|
@ -291,7 +291,7 @@ FILE* fdopen(int fd, const char* mode) {
|
||||||
if (fcntl(fd, F_SETFL, fd_flags | O_APPEND) == -1) return nullptr;
|
if (fcntl(fd, F_SETFL, fd_flags | O_APPEND) == -1) return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure O_CLOEXEC is set on the underlying fd if our mode has 'x'.
|
// Make sure O_CLOEXEC is set on the underlying fd if our mode has 'e'.
|
||||||
if ((mode_flags & O_CLOEXEC) && !((tmp = fcntl(fd, F_GETFD)) & FD_CLOEXEC)) {
|
if ((mode_flags & O_CLOEXEC) && !((tmp = fcntl(fd, F_GETFD)) & FD_CLOEXEC)) {
|
||||||
fcntl(fd, F_SETFD, tmp | FD_CLOEXEC);
|
fcntl(fd, F_SETFD, tmp | FD_CLOEXEC);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue