diff options
author | Dong-hee Na <donghee.na@python.org> | 2021-12-14 01:31:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 01:31:41 (GMT) |
commit | 9130a4d62032468e0d4949aaa49c29afb0d854ca (patch) | |
tree | 14b473d640f9510aec9a811bd40b560db2ccaa14 /Python/pylifecycle.c | |
parent | 121f1f893a39d0b58d3d2b5597505c154ecaac2a (diff) | |
download | cpython-9130a4d62032468e0d4949aaa49c29afb0d854ca.zip cpython-9130a4d62032468e0d4949aaa49c29afb0d854ca.tar.gz cpython-9130a4d62032468e0d4949aaa49c29afb0d854ca.tar.bz2 |
bpo-45919: Remove out of date comment (GH-30090)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 22281a3..b2f58f4 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -2166,13 +2166,15 @@ is_valid_fd(int fd) some platforms. fcntl(fd, F_GETFD) is even faster, because it only checks the process table. + It is preferred over dup() when available, since it cannot fail with the + "too many open files" error (EMFILE). bpo-30225: On macOS Tiger, when stdout is redirected to a pipe and the other side of the pipe is closed, dup(1) succeed, whereas fstat(1, &st) fails with EBADF. FreeBSD has similar issue (bpo-32849). - Only use dup() on platforms where dup() is enough to detect invalid FD in - corner cases: on Linux and Windows (bpo-32849). + Only use dup() on Linux where dup() is enough to detect invalid FD + (bpo-32849). */ if (fd < 0) { return 0; |