diff options
author | Anthony Shaw <anthony.p.shaw@gmail.com> | 2019-05-10 12:00:06 +1000 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-05-10 04:00:06 +0200 |
commit | 948ed8c96b6912541a608591efe3e00fb520429a (patch) | |
tree | f425a515663321d16ded48c9cedf94ddf5ca371f /Modules | |
parent | fce5ff1e18b522cf52379934a6560583d840e7f9 (diff) | |
download | cpython-git-948ed8c96b6912541a608591efe3e00fb520429a.tar.gz |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 221f7101b2..aa77094da0 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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 |