Mercurial > cpython-lru_cache-weakref
diff PC/_subprocess.c @ 63814:a0bdcdd0f086 2.7
Issue #3210: Revert C module changes and apply patch from Hirokazu Yamamoto instead
| author | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| date | Sun, 08 Aug 2010 11:17:56 +0000 |
| parents | 2c10510a1aef |
| children | b36cb4602e21 |
line wrap: on
line diff
--- a/PC/_subprocess.c Sun Aug 08 00:35:03 2010 +0000 +++ b/PC/_subprocess.c Sun Aug 08 11:17:56 2010 +0000 @@ -425,7 +425,6 @@ PyObject* env_mapping; char* current_directory; PyObject* startup_info; - DWORD error; if (! PyArg_ParseTuple(args, "zzOOiiOzO:CreateProcess", &application_name, @@ -475,22 +474,8 @@ 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),
