Skip to content

Commit

Permalink
Don't return errno in uv_get_constrained_memory when opening file des…
Browse files Browse the repository at this point in the history
…criptors
  • Loading branch information
Jarred-Sumner committed Oct 12, 2023
1 parent 1044992 commit acc1e09
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Source/bmalloc/bmalloc/uv_get_constrained_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ static inline void assert(bool)

static int uv__open_cloexec(const char* path, int flags)
{
int fd;

fd = open(path, flags | O_CLOEXEC, 0);
int fd = -1;
do {
fd = open(path, flags | O_CLOEXEC, 0);
} while (fd == -1 && errno == EINTR);

if (fd == -1)
return errno;
return -1;

return fd;
}
Expand Down

0 comments on commit acc1e09

Please sign in to comment.