| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Helper to write() which retries write() if it is interrupted by a signal (fails
with EINTR).
|
|
|
|
| |
Add _Py_fstat_noraise() function when a Python exception is not welcome.
|
|
|
|
|
|
|
| |
I expected more users of _Py_wstat(), but in practice it's only used by
Modules/getpath.c. Move the function because it's not needed on Windows.
Windows uses PC/getpathp.c which uses the Win32 API (ex: GetFileAttributesW())
not the POSIX API.
|
|
|
|
|
|
|
| |
fstat(), these functions are always required.
Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and
DONT_HAVE_FSTAT.
|
|
|
|
|
| |
Save and then restore errno because PyErr_CheckSignals() and
PyErr_SetFromErrno() can modify it.
|
|
|
|
| |
_Py_write() to know which test failed on the buildbot "AMD64 Snow Leop 3.x".
|
|
|
|
| |
Fix typo: self->fd => fd
|
|
|
|
|
|
|
|
| |
EINTR error and special cases for Windows.
These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.
|
|
|
|
|
| |
Retry open()/fopen() if it fails with EINTR and the Python signal handler
doesn't raise an exception.
|
|
|
|
|
| |
* If fopen() fails, OSError is raised with the original filename object.
* The GIL is now released while calling fopen()
|
|
|
|
|
|
|
|
| |
* _Py_open() now raises exceptions on error. If open() fails, it raises an
OSError with the filename.
* _Py_open() now releases the GIL while calling open()
* Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not
held
|
|\ |
|
| | |
|
| |
| |
| |
| | |
the errno shim.
|
| |
| |
| |
| | |
_set_thread_local_invalid_parameter_handler on every thread.
|
| |
| |
| |
| | |
removes unused struct win32_stat and return value
|
| | |
|
| |
| |
| |
| |
| |
| | |
Windows.
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
|
|\ \
| |/ |
|
| |\ |
|
| | |\ |
|
| | | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | |
| | | | |
Illumos. This platform exposes the function ioctl(FIOCLEX), but calling it
fails with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable()
now falls back to the slower fcntl() (F_GETFD and then F_SETFD).
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This platform exposes the function ioctl(FIOCLEX), but calling it fails with
errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable() now falls
back to the slower fcntl() (F_GETFD and then F_SETFD).
|
| | | |
| | | |
| | | |
| | | |
| | | | |
``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document these
functions.
|
|/ / /
| | |
| | |
| | |
| | | |
set the blocking mode of a file descriptor (False if the O_NONBLOCK flag is
set, True otherwise). These functions are not available on Windows.
|
|\ \ \
| |/ / |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | | |
PATH_MAX is not declared on IRIX nor Windows.
|
| | |
| | |
| | |
| | | |
PATH_MAX is not declared on IRIX nor Windows.
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
|
| | | |
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding
(which may be ASCII if no locale environment variable is set), to avoid
inconsistencies with os.fsencode() and os.fsdecode() functions which are
already using UTF-8/surrogateescape.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding
(which may be ASCII if no locale environment variable is set), to avoid
inconsistencies with os.fsencode() and os.fsdecode() functions which are
already using UTF-8/surrogateescape.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Patch written by Vajrasky Kok.
|
| | |
| | |
| | |
| | |
| | | |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
| | |
| | |
| | |
| | | |
_Py_char2wchar()
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Replace malloc() with PyMem_RawMalloc()
* Replace PyMem_Malloc() with PyMem_RawMalloc() where the GIL is not held.
* _Py_char2wchar() now returns a buffer allocated by PyMem_RawMalloc(), instead
of PyMem_Malloc()
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
HAVE_MBRTOWC is not defined
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
UTF-8/surrogateescape, instead of the locale encoding (which may be ASCII if no
locale environment variable is set), to avoid inconsistencies with
os.fsencode() and os.fsdecode() functions which are already using
UTF-8/surrogateescape.
|
|\ \ \
| |/ / |
|