summaryrefslogtreecommitdiffstats
path: root/Modules/fcntlmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-116622: Don't expose `FICLONE` ioctl on Android (GH-122522) (#122539)Miss Islington (bot)2024-08-161-0/+5
| | | | | | | | | | gh-116622: Don't expose `FICLONE` ioctl on Android (GH-122522) Don't expose `FICLONE` ioctl on Android (cherry picked from commit 06656e259bc9b2c3cf8a23bdc6e4acb052c56e1f) Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
* [3.13] Revert "[3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) ↵Victor Stinner2024-06-011-3/+3
| | | | | | | | | | (… (#119906) Revert "[3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) (#119504)" This reverts commit 0bab0b3a53da735838720f96f3d3bf86ca6ba125. The change modified how negative values, like termios.TIOCSWINSZ, was treated and is actually backward incompatible.
* [3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) (#119504)Miss Islington (bot)2024-05-241-3/+3
| | | | | | | | | gh-69214: Fix fcntl.ioctl() request type (GH-119498) Use an 'unsigned long' instead of an 'unsigned int' for the request parameter of fcntl.ioctl() to support requests larger than UINT_MAX. (cherry picked from commit 92fab3356f4c61d4c73606e4fae705c6d8f6213b) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-116322: Add Py_mod_gil module slot (#116882)Brett Simmers2024-05-031-0/+1
| | | | | | | | | | | | | | This PR adds the ability to enable the GIL if it was disabled at interpreter startup, and modifies the multi-phase module initialization path to enable the GIL when loading a module, unless that module's spec includes a slot indicating it can run safely without the GIL. PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148. A warning will be issued up to once per interpreter for the first GIL-using module that is loaded. If `-v` is given, a shorter message will be printed to stderr every time a GIL-using module is loaded (including the first one that issues a warning).
* gh-85283: Build fcntl extension with the limited C API (#116791)Victor Stinner2024-03-141-8/+11
|
* gh-114321: Expose more constants in the fcntl module (GH-114322)Serhiy Storchaka2024-01-221-0/+53
|
* gh-107913: Fix possible losses of OSError error codes (GH-107930)Serhiy Storchaka2023-08-261-2/+3
| | | | | | Functions like PyErr_SetFromErrno() and SetFromWindowsErr() should be called immediately after using the C API which sets errno or the Windows error code.
* gh-106320: Remove private _PyLong_FileDescriptor_Converter() (#108503)Victor Stinner2023-08-261-0/+4
| | | | | | | | | Move the private _PyLong converter functions to the internal C API * _PyLong_FileDescriptor_Converter(): moved to pycore_fileutils.h * _PyLong_Size_t_Converter(): moved to pycore_long.h Argument Clinic now emits includes for pycore_fileutils.h and pycore_long.h when these functions are used.
* gh-104922: remove PY_SSIZE_T_CLEAN (#106315)Inada Naoki2023-07-021-3/+0
|
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-051-0/+1
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
* gh-93475: Expose FICLONE and FICLONERANGE constants in fcntl (#93478)Illia Volochii2022-06-061-0/+9
|
* bpo-46016: fcntl module add FreeBSD's F_DUP2FD_CLOEXEC flag support (GH-29993)David CARLIER2021-12-081-0/+8
|
* bpo-41586: Add pipesize parameter to subprocess & F_GETPIPE_SZ and ↵Ruben Vorderman2020-10-191-0/+8
| | | | | | | | | | | | | | | | | F_SETPIPE_SZ to fcntl. (GH-21921) * Add F_SETPIPE_SZ and F_GETPIPE_SZ to fcntl module * Add pipesize parameter for subprocess.Popen class This will allow the user to control the size of the pipes. On linux the default is 64K. When a pipe is full it blocks for writing. When a pipe is empty it blocks for reading. On processes that are very fast this can lead to a lot of wasted CPU cycles. On a typical Linux system the max pipe size is 1024K which is much better. For high performance-oriented libraries such as xopen it is nice to be able to set the pipe size. The workaround without this feature is to use my_popen_process.stdout.fileno() in conjuction with fcntl and 1031 (value of F_SETPIPE_SZ) to acquire this behavior.
* bpo-41985: Add _PyLong_FileDescriptor_Converter and AC converter for ↵Serhiy Storchaka2020-10-091-20/+8
| | | | "fildes". (GH-22620)
* bpo-1635741: Port fcntl module to multiphase initialization (GH-20540)Dong-hee Na2020-06-011-22/+19
|
* bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, ↵Saiyang Gou2020-02-131-0/+18
| | | | `resource`, `shutil`, `signal`, `syslog` (GH-18407)
* bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236)Brandt Bucher2019-11-191-1/+3
|
* bpo-38602: Add fcntl.F_OFD_XXXX for fcntlmodule (GH-16956)Dong-hee Na2019-10-281-0/+9
|
* closes bpo-37964: add F_GETPATH command to fcntl (GH-15550)Vinay Sharma2019-08-291-0/+3
| | | | | | | https://bugs.python.org/issue37964 Automerge-Triggered-By: @benjaminp
* bpo-26835: Add file sealing constants to fcntl (GH-13694)Christian Heimes2019-05-311-1/+9
| | | Co-authored-by: nanjekyejoannah <nanjekyejoannah@gmail.com>
* bpo-35189: Retry fnctl calls on EINTR (GH-10413)nierob2018-11-231-23/+32
| | | | Modify the following fnctl function to retry if interrupted by a signal (EINTR): flock, lockf, fnctl.
* bpo-32747: Remove trailing spaces in docstrings. (GH-5491)oldk2018-02-021-1/+1
|
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-7/+7
|
* Issue #28139: Fix messed up indentationMartin Panter2016-09-171-1/+1
| | | | | Also update the classmethod and staticmethod doc strings and comments to match the RST documentation.
* Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-8/+8
| | | | generated by Argument Clinic. Patch by Petr Viktorin.
* Issue #26716: Regenerate Argument Clinic code.Serhiy Storchaka2016-04-141-1/+1
|
* Update fcntl doc: replace IOError with OSErrorVictor Stinner2016-04-091-1/+1
| | | | Issue #26716. IOError is a deprecated alias to OSError since Python 3.3.
* Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.Larry Hastings2015-04-141-4/+6
|
* Issue #23501: Argumen Clinic now generates code into separate files by default.Serhiy Storchaka2015-04-031-2/+1
|
* Issue #22832: Tweaked parameter names for fcntl module to better matchSerhiy Storchaka2015-03-201-25/+24
| | | | | official POSIX documentation. Updated the documenttion for Python 3. Patch by Alex Shkop.
* Issue #22883: Got rid of outdated references to PyInt and PyString in comments.Serhiy Storchaka2015-02-171-5/+2
|
* Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endianSerhiy Storchaka2014-11-101-3/+3
|\ | | | | | | platforms.
| * Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endianSerhiy Storchaka2014-11-101-2/+2
| | | | | | | | platforms.
* | Issue 20152, 22821: Port the fcntl module to Argument Clinic.Brett Cannon2014-11-101-210/+228
| | | | | | | | | | | | | | | | Along the way, fix an argumrnt to fcntl.fcntl to be an int instead of a long. Thanks to Serhiy Storchaka for reviewing my Clinic patch and for writing the patch to fix the long/int issue.
* | Issue #22207: Fix "comparison between signed and unsigned integers" warning inVictor Stinner2014-08-171-1/+1
|/ | | | | test checking for integer overflow on Py_ssize_t type: cast explicitly to size_t.
* Issue #16136: Remove VMS support and VMS-related codeChristian Heimes2013-12-211-4/+0
|
* Issue #18994: Add a missing check for a return value in fcntmodule. Patch byCharles-François Natali2013-12-011-1/+3
| | | | Vajrasky Kok.
* Merge #18985: Improve fcntl documentation.R David Murray2013-11-071-11/+13
|\
| * #18985: Improve fcntl documentation.R David Murray2013-11-071-11/+13
| | | | | | | | Original patch by Vajrasky Kok, further improved (I hope) by me.
* | Issue #19147: merge from 3.3Ned Deily2013-10-021-1/+1
|\ \ | |/
| * Issue #19147: Fix docstring for fcntl.flock to refer to correct man section.Ned Deily2013-10-021-1/+1
| |
* | Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()Charles-Francois Natali2013-05-201-89/+76
| | | | | | | | when applicable.
* | fcntl: add F_DUPFD_CLOEXEC constant, available on Linux 2.6.24+.Victor Stinner2013-01-071-0/+3
| |
* | #16135: Removal of OS/2 support (Modules/*)Jesus Cea2012-10-051-6/+0
|/
* Issue #13324: fcntlmodule: Add the F_NOCACHE flag. Patch by Alex Stewart.Charles-François Natali2011-11-021-1/+4
|
* Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True,Antoine Pitrou2010-09-071-1/+1
| | | | | and the passed buffer was exactly 1024 bytes long, the buffer wouldn't be updated back after the system call. Original patch by Brian Brazil.
* #9776: fix some spacing.Georg Brandl2010-09-051-3/+3
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-360/+360
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 72887 via svnmerge fromAntoine Pitrou2009-05-241-2/+2
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72887 | antoine.pitrou | 2009-05-24 17:40:09 +0200 (dim., 24 mai 2009) | 6 lines Issue #1309352: fcntl now converts its third arguments to a C `long` rather than an int, which makes some operations possible under 64-bit Linux (e.g. DN_MULTISHOT with F_NOTIFY). ........
* Merged revisions 65654 via svnmerge fromMartin v. Löwis2008-08-131-4/+14
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65654 | martin.v.loewis | 2008-08-12 16:49:50 +0200 (Tue, 12 Aug 2008) | 6 lines Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple, by denying s# to parse objects that have a releasebuffer procedure, and introducing s*. More module might need to get converted to use s*. ........