diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/fileutils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index a8fab00..e8a7eda 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1374,10 +1374,11 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works) return 0; } -#ifdef __linux__ +#ifdef O_PATH if (errno == EBADF) { - // On Linux, ioctl(FIOCLEX) will fail with EBADF for O_PATH file descriptors - // Fall through to the fcntl() path + // bpo-44849: On Linux and FreeBSD, ioctl(FIOCLEX) fails with EBADF + // on O_PATH file descriptors. Fall through to the fcntl() + // implementation. } else #endif |