mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #17931: Resolve confusion on Windows between pids and process handles.
This commit is contained in:
parent
448f1a86ef
commit
ac0ad884d1
5 changed files with 29 additions and 23 deletions
|
@ -113,11 +113,12 @@ os.O_BINARY.");
|
|||
static PyObject *
|
||||
msvcrt_open_osfhandle(PyObject *self, PyObject *args)
|
||||
{
|
||||
long handle;
|
||||
Py_intptr_t handle;
|
||||
int flags;
|
||||
int fd;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "li:open_osfhandle", &handle, &flags))
|
||||
if (!PyArg_ParseTuple(args, _Py_PARSE_INTPTR "i:open_osfhandle",
|
||||
&handle, &flags))
|
||||
return NULL;
|
||||
|
||||
fd = _open_osfhandle(handle, flags);
|
||||
|
|
|
@ -723,8 +723,8 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
|
|||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#define SIZEOF_WCHAR_T 2
|
||||
|
||||
/* The size of `pid_t' (HANDLE). */
|
||||
#define SIZEOF_PID_T SIZEOF_VOID_P
|
||||
/* The size of `pid_t', as computed by sizeof. */
|
||||
#define SIZEOF_PID_T SIZEOF_INT
|
||||
|
||||
/* Define if you have the dl library (-ldl). */
|
||||
/* #undef HAVE_LIBDL */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue