mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user