Fix age-old bug with flag combining.

I guess it never cauased a problem because the result was 1 which just happened to map to TAKE_OWNERSHIP and the other flags are safe to skip (just inefficient)...
This commit is contained in:
Kenton Varda committed 2019-02-09 15:29:42 -08:00
1 parent 1abd120c12
commit cbb3ab40fb
1 file changed
+1 -1
+1 -1
View File
@@ -236,7 +236,7 @@ static int applyFlags(int fd, uint flags) {
static constexpr uint NEW_FD_FLAGS =
#if __linux__
kj::LowLevelAsyncIoProvider::ALREADY_CLOEXEC || kj::LowLevelAsyncIoProvider::ALREADY_NONBLOCK ||
kj::LowLevelAsyncIoProvider::ALREADY_CLOEXEC | kj::LowLevelAsyncIoProvider::ALREADY_NONBLOCK |
#endif
kj::LowLevelAsyncIoProvider::TAKE_OWNERSHIP;
// We always try to open FDs with CLOEXEC and NONBLOCK already set on Linux, but on other platforms