-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
closefrom check is too strict #112970
Labels
type-bug
An unexpected behavior, bug, or error
Comments
thesamesam
added a commit
to thesamesam/cpython
that referenced
this issue
Dec 11, 2023
glibc-2.34 implements closefrom(3) using the same semantics as on BSD. Check for closefrom in configure and use the check result in fileutils.c rather than hardcoding a FreeBSD check (which was wrong for other BSDs anyway). Signed-off-by: Sam James <sam@gentoo.org>
thesamesam
added a commit
to thesamesam/cpython
that referenced
this issue
Dec 11, 2023
glibc-2.34 implements closefrom(3) using the same semantics as on BSD. Check for closefrom in configure and use the check result in fileutils.c rather than hardcoding a FreeBSD check (which was wrong for other BSDs anyway). Signed-off-by: Sam James <sam@gentoo.org>
We noticed this when poking at a swarm of |
erlend-aasland
pushed a commit
that referenced
this issue
Dec 12, 2023
glibc-2.34 implements closefrom(3) using the same semantics as on BSD. Check for closefrom() in configure and use the check result in fileutils.c, rather than hardcoding a FreeBSD check. Some implementations of closefrom() return an int. Explicitly discard the return value by casting it to void, to avoid future compiler warnings. Signed-off-by: Sam James <sam@gentoo.org>
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
…2969) glibc-2.34 implements closefrom(3) using the same semantics as on BSD. Check for closefrom() in configure and use the check result in fileutils.c, rather than hardcoding a FreeBSD check. Some implementations of closefrom() return an int. Explicitly discard the return value by casting it to void, to avoid future compiler warnings. Signed-off-by: Sam James <sam@gentoo.org>
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
…2969) glibc-2.34 implements closefrom(3) using the same semantics as on BSD. Check for closefrom() in configure and use the check result in fileutils.c, rather than hardcoding a FreeBSD check. Some implementations of closefrom() return an int. Explicitly discard the return value by casting it to void, to avoid future compiler warnings. Signed-off-by: Sam James <sam@gentoo.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
closefrom(3)
is available with >=glibc-2.34 on Linux (and Hurd, but, well...)The check in
Python/fileutils.c
is a bit too strict, as it hardcodes FreeBSD. This excludes both the aforementioned systems but also other BSDs where I believe it's available.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: