mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Issue #3210: Revert C module changes and apply patch from Hirokazu Yamamoto instead
This commit is contained in:
parent
afdeca980d
commit
ad537f23e2
2 changed files with 15 additions and 31 deletions
|
@ -429,7 +429,6 @@ sp_CreateProcess(PyObject* self, PyObject* args)
|
|||
PyObject* env_mapping;
|
||||
Py_UNICODE* current_directory;
|
||||
PyObject* startup_info;
|
||||
DWORD error;
|
||||
|
||||
if (! PyArg_ParseTuple(args, "ZZOOiiOZO:CreateProcess",
|
||||
&application_name,
|
||||
|
@ -479,22 +478,8 @@ sp_CreateProcess(PyObject* self, PyObject* args)
|
|||
|
||||
Py_XDECREF(environment);
|
||||
|
||||
if (! result) {
|
||||
error = GetLastError();
|
||||
if(si.hStdInput != INVALID_HANDLE_VALUE) {
|
||||
CloseHandle(si.hStdInput);
|
||||
si.hStdInput = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
if(si.hStdOutput != INVALID_HANDLE_VALUE) {
|
||||
CloseHandle(si.hStdOutput);
|
||||
si.hStdOutput = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
if(si.hStdError != INVALID_HANDLE_VALUE) {
|
||||
CloseHandle(si.hStdError);
|
||||
si.hStdError = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
return PyErr_SetFromWindowsErr(error);
|
||||
}
|
||||
if (! result)
|
||||
return PyErr_SetFromWindowsErr(GetLastError());
|
||||
|
||||
return Py_BuildValue("NNii",
|
||||
sp_handle_new(pi.hProcess),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue