mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-36814: ensure os.posix_spawn() handles None (GH-13144)
Fix an issue where os.posix_spawn() would incorrectly raise a TypeError when file_actions is None.
This commit is contained in:
parent
fce5ff1e18
commit
948ed8c96b
3 changed files with 11 additions and 1 deletions
|
@ -5465,7 +5465,7 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *a
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (file_actions != NULL) {
|
||||
if (file_actions != NULL && file_actions != Py_None) {
|
||||
/* There is a bug in old versions of glibc that makes some of the
|
||||
* helper functions for manipulating file actions not copy the provided
|
||||
* buffers. The problem is that posix_spawn_file_actions_addopen does not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue