bpo-45944: Avoid calling isatty() for most open() calls#29870
bpo-45944: Avoid calling isatty() for most open() calls#29870collinanderson wants to merge 2 commits into
Conversation
tiran
left a comment
There was a problem hiding this comment.
That's a clever hack!
I made a few suggestions to use correct Py_ssize_t everwhere.
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
@collinanderson The PR has gone stale. Can you address the review comments? Or are you ok will someone else picking this up? |
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Sorry, something went wrong.
|
(And there is no signs of life anyway...) |
Sorry, something went wrong.
|
Ohh awesome. Thank you! Yeah Sorry I'm not much of a C programmer. I'm super excited to see #120754 syscalls being optimized. |
Sorry, something went wrong.
https://bugs.python.org/issue45944
isatty() is a system call on linux. Most open()s are files, and we're already getting the size of the file. If it has a size, then we know it's not a atty, and can avoid calling it.
https://bugs.python.org/issue45944