| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
(cherry picked from commit 7f21c9ac872acc2114aee3313d132b016550ff42)
Co-authored-by: Minmin Gong <gongminmin@msn.com>
|
| |
|
|
|
|
|
|
| |
Fix the Windows implementation of os.waitpid() for exit code
larger than "INT_MAX >> 8". The exit status is now interpreted as an
unsigned number.
(cherry picked from commit b07350901cac9197aef41855d8a4d56533636b91)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix os.getgrouplist(): if getgrouplist() function fails because the
group list is too small, retry with a larger group list.
On failure, the glibc implementation of getgrouplist() sets ngroups
to the total number of groups. For other implementations, double the
group list size.
(cherry picked from commit f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
| |
On macOS, getgrouplist() returns a non-zero value without setting
errno if the group list is too small. Double the list size and call
it again in this case.
(cherry picked from commit 8ec7370c89aa522602eb9604086ce9f09770953d)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
| |
(GH-14414)
(cherry picked from commit 45a30af109f69a81576b87ea775863ba12d55316)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 8725c83ed5ca8959195ad8326db99d564a921749)
Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
path_converter (GH-11831)
The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.
(cherry picked from commit 09fbcd6085e18b534fd4161844ff39f77eb4a082)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 73d600239b0aa34198bce2b7982e4ff14c92f119)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
| |
|
|
|
|
| |
Make sure that failure paths call CloseHandle outside of the function that failed
(cherry picked from commit b82bfac4369c0429e562a834b3752e66c4821eab)
Co-authored-by: Mark Becwar <mark@thebecwar.com>
|
| |
|
|
|
|
|
| |
It doesn't know the details of a few less common libc functions..
(cherry picked from commit 1d300ce1d8238136595c8fea76266a4755cd73a2)
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
|
| |
|
|
|
|
|
|
|
|
| |
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.
Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_systemGH-Solaris
https://bugs.python.org/issue35550
(cherry picked from commit 6f9bc72c79c3262e5d0f2c0e96b016477399cfb1)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
| |
|
|
|
|
| |
AC. (GH-11150). (GH-11151)
(cherry picked from commit afb3e71a1710c444fbe789b51df43ee16ee9ede7)
|
| |
|
|
|
| |
(GH-11015) (GH-11020)
(cherry picked from commit 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9)
|
| |
|
|
|
| |
(cherry picked from commit 32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
os_read_impl() now also truncates the size to _PY_READ_MAX
on macOS, to avoid to allocate a larger buffer even if _Py_read() is
limited to _PY_READ_MAX bytes (ex: INT_MAX on macOS).
(cherry picked from commit 9a0d7a7648547ffb77144bf2480155f6d7940dea)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
| |
Some methods in the os module can accept path-like objects. This is documented in the general documentation but not in the function docstrings. To keep both in sync, the docstrings need to be updated to reflect that path-like objects are also accepted..
(cherry picked from commit b942707fc23454a998323c17e30be78ff1a4f0e7)
Co-authored-by: BNMetrics <luna@bnmetrics.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
truncate() (GH-5784)
path_error() uses GetLastError() on Windows, but some os functions
are implemented via CRT APIs which report errors via errno.
This may result in raising OSError with invalid error code (such
as zero).
Introduce posix_path_error() function and use it where appropriate.
(cherry picked from commit 834603112e6ca35944dd21105b01fca562dc3241)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
|
| |
|
|
|
| |
(cherry picked from commit 0bd1a2dcfdf36b181385ae61361e7692f4ebb0fd)
Co-authored-by: Oren Milman <orenmn@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix integer overflow in os.readv(), os.writev(), os.preadv()
and os.pwritev() and in os.sendfile() with headers or trailers
arguments (on BSD-based OSes and MacOS).
* Fix sending the part of the file in os.sendfile() on MacOS.
Using the trailers argument could cause sending more bytes from
the input file than was specified.
Thanks Ned Deily for testing on 32-bit MacOS.
(cherry picked from commit 9d5727326af53ddd91016d98e16ae7cf829caa95)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
| |
Remove os.posix_spawn, the API isn't complete and we're still figuring out how it should look. wait for 3.8.
|
| |
|
|
|
|
|
| |
os.posix_spawn(). (GH-6332)
(cherry picked from commit ef347535f289baad22c0601e12a36b2dcd155c3a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-6010)
(cherry picked from commit 3b20d3454e8082e07dba93617793de5dc9237828)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 6921e73e33edc3c61bc2d78ed558eaa22a89a564)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
| |
|
|
|
| |
(cherry picked from commit 3e197c7a6740d564ad52fb7901c07d5ff49460f5)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
now correctly convert from bytes. (GH-5761)
(cherry picked from commit 23ad6d0d1a7a6145a01494f4f3913a63d1f0250c)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
os.dup2() tests for dup3() system call availability at runtime,
but doesn't remember the result across calls, repeating
the test on each call with inheritable=False.
Since the caller of os.dup2() is expected to hold the GIL,
fix this by making the variable holding the test result static.
(cherry picked from commit b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
A closing parentheses was missing.
Signed-off-by: Ngie Cooper <yaneurabeya@gmail.com>
(cherry picked from commit 7745ec4e356ac1f4eaf43b155f4482c20a907d48)
Co-authored-by: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
The PrintNameOffset field of the reparse data buffer
was treated as a number of characters instead of bytes.
(cherry picked from commit 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7)
Co-authored-by: SSE4 <tomskside@gmail.com>
|
| |
|
|
|
| |
(GH-5346)
See https://bugs.python.org/issue32441 for where this was introduced.
|
| |
|
|
|
|
|
|
|
|
| |
* Fix memory leaks and error handling in posix spawn
* Improve error handling when destroying the file_actions object
* Py_DECREF the result of PySequence_Fast on error
* Handle uninitialized pid
* Use OSError if file actions fails to initialize
* Move _file_actions to outer scope to avoid undefined behaviour
* Remove HAVE_POSIX_SPAWN define in Modules/posixmodule.c
* Unshadow exception and clean error message
|
| | |
|
| |
|
|
|
| |
Add os.posix_spawn to wrap the low level POSIX API of the same name.
Contributed by Pablo Galindo.
|
| |
|
|
|
|
| |
* bpo-32659: Solaris "stat" should support "st_fstype"
* Add 'versionadded'
|
| | |
|
| |
|
|
| |
os.statvfs() (#4972)
|
| | |
|
| |
|
|
|
| |
Implement find_library() support in ctypes/util for AIX.
Add some AIX specific tests.
|
| |
|
| |
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
| | |
|
| |
|
|
| |
Remove dangling references to PYCC_VACPP that are not relelvant
since removal of OS/2 support.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the pthread+semaphore implementation of
PyThread_acquire_lock_timed() when called with timeout > 0 and
intr_flag=0: recompute the timeout if sem_timedwait() is interrupted
by a signal (EINTR).
See also the PEP 475.
The pthread implementation of PyThread_acquire_lock() now fails with
a fatal error if the timeout is larger than PY_TIMEOUT_MAX, as done
in the Windows implementation.
The check prevents any risk of overflow in PyThread_acquire_lock().
Add also PY_DWORD_MAX constant.
|
| | |
|
| |
|
| |
LoadLibrary("SHELL32") is not vulnerable to DLL hijacking.
|
| |
|
|
|
|
|
|
|
| |
See PEP 539 for details.
Highlights of changes:
- Add Thread Specific Storage (TSS) API
- Document the Thread Local Storage (TLS) API as deprecated
- Update code that used TLS API to use TSS API
|
| | |
|
| |
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
| |
|
|
|
|
| |
Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray
plans to remove the functions from sys/types.h.
Signed-off-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
| |
* Fixes #30581 by adding a path to use newer GetMaximumProcessorCount API on Windows calls to os.cpu_count()
* Add NEWS.d entry for bpo-30581, os.cpu_count on Windows.
* Tweak NEWS entry
|
| |
|
|
| |
(#3000) (#3000)
|
| | |
|