Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c363061

Browse files
committed
Merge from 3.5 and fix a few other functions missing IPH handling.
2 parents 43891e0 + 11f4326 commit c363061

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,8 @@ Core and Builtins
635635
Library
636636
-------
637637

638+
- Issue #28732: Fix crash in os.spawnv() with no elements in args
639+
638640
- Issue #28485: Always raise ValueError for negative
639641
compileall.compile_dir(workers=...) parameter, even when multithreading is
640642
unavailable.

Modules/posixmodule.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3347,8 +3347,7 @@ os_link_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
33473347

33483348
#ifdef MS_WINDOWS
33493349
Py_BEGIN_ALLOW_THREADS
3350-
if (src->wide)
3351-
result = CreateHardLinkW(dst->wide, src->wide, NULL);
3350+
result = CreateHardLinkW(dst->wide, src->wide, NULL);
33523351
Py_END_ALLOW_THREADS
33533352

33543353
if (!result)
@@ -4111,7 +4110,9 @@ os_system_impl(PyObject *module, Py_UNICODE *command)
41114110
{
41124111
long result;
41134112
Py_BEGIN_ALLOW_THREADS
4113+
_Py_BEGIN_SUPPRESS_IPH
41144114
result = _wsystem(command);
4115+
_Py_END_SUPPRESS_IPH
41154116
Py_END_ALLOW_THREADS
41164117
return result;
41174118
}
@@ -6889,7 +6890,9 @@ os_waitpid_impl(PyObject *module, intptr_t pid, int options)
68896890

68906891
do {
68916892
Py_BEGIN_ALLOW_THREADS
6893+
_Py_BEGIN_SUPPRESS_IPH
68926894
res = _cwait(&status, pid, options);
6895+
_Py_END_SUPPRESS_IPH
68936896
Py_END_ALLOW_THREADS
68946897
} while (res < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
68956898
if (res < 0)
@@ -8256,6 +8259,7 @@ os_pipe_impl(PyObject *module)
82568259
attr.bInheritHandle = FALSE;
82578260

82588261
Py_BEGIN_ALLOW_THREADS
8262+
_Py_BEGIN_SUPPRESS_IPH
82598263
ok = CreatePipe(&read, &write, &attr, 0);
82608264
if (ok) {
82618265
fds[0] = _open_osfhandle((intptr_t)read, _O_RDONLY);
@@ -8266,6 +8270,7 @@ os_pipe_impl(PyObject *module)
82668270
ok = 0;
82678271
}
82688272
}
8273+
_Py_END_SUPPRESS_IPH
82698274
Py_END_ALLOW_THREADS
82708275

82718276
if (!ok)

0 commit comments

Comments
 (0)