]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-132742: Refactor fcntl.fcntl() and fcntl.ioctl() (GH-132768)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 24 Apr 2025 16:17:11 +0000 (19:17 +0300)
committerGitHub <noreply@github.com>
Thu, 24 Apr 2025 16:17:11 +0000 (19:17 +0300)
commit9f5994b94cb6b8526bcb8fa29a99656dc403e25e
tree929e24c1126ec6423564f6734f359b6927b1a0bf
parent8c975b0fddf0df4172634894f61a7d7c8db48255
gh-132742: Refactor fcntl.fcntl() and fcntl.ioctl()  (GH-132768)

* Support arbitrary bytes-like objects, not only bytes, in fcntl().
* The fcntl() buffer argument is now null-terminated.
* Automatically retry an ioctl() system calls failing with EINTR.
* Release the GIL for an ioctl() system call even for large bytes-like object.
* Do not silence arbitrary errors whet try to get a buffer.
* Optimize argument parsing, check the argument type before trying to get
  a buffer or convert it to integer.
* Fix some error messages.
Doc/library/fcntl.rst
Misc/NEWS.d/next/Library/2025-04-23-14-50-45.gh-issue-132742.PB6B7F.rst [new file with mode: 0644]
Modules/clinic/fcntlmodule.c.h
Modules/fcntlmodule.c