From 462313f930b8070142d4debd8d10b31967c84eaf Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 7 Jun 2020 19:58:52 -0700 Subject: [PATCH] Remove ASSERT_IS_NOT_FORKED_CHILD from open_cloexec This was tripping initialization order checks from ASAN, and is otherwise not a very useful check here. --- src/wutil.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wutil.cpp b/src/wutil.cpp index f1e0fcd39..75af600d2 100644 --- a/src/wutil.cpp +++ b/src/wutil.cpp @@ -166,11 +166,10 @@ int open_cloexec(const std::string &path, int flags, mode_t mode) { } int open_cloexec(const char *path, int flags, mode_t mode) { - ASSERT_IS_NOT_FORKED_CHILD(); int fd; +// Prefer to use O_CLOEXEC. #ifdef O_CLOEXEC - // Prefer to use O_CLOEXEC. It has to both be defined and nonzero. fd = open(path, flags | O_CLOEXEC, mode); #else fd = open(path, flags, mode);