diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-30 12:11:40 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-30 12:11:40 +0200 |
commit | e492b4b2caa961c54c59191157343ef5c11c7b1f (patch) | |
tree | e73325d63f7859037143fb54901e37900b44b0d6 | |
parent | 70fff514f12c7f2789e5d8e26140a274dc64f841 (diff) | |
download | psutil-e492b4b2caa961c54c59191157343ef5c11c7b1f.tar.gz |
windows / create_time: remove check using GetExitCodeProcess to make sure the process is not gone as it seems useless and may also be the cause of errors on appveyor
-rw-r--r-- | psutil/_psutil_windows.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index 9e16d207..7c247975 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -492,6 +492,7 @@ psutil_proc_create_time(PyObject *self, PyObject *args) { } } +/* // Make sure the process is not gone as OpenProcess alone seems to be // unreliable in doing so (it seems a previous call to p.wait() makes // it unreliable). @@ -509,12 +510,10 @@ psutil_proc_create_time(PyObject *self, PyObject *args) { if (GetLastError() != ERROR_ACCESS_DENIED) return PyErr_SetFromWindowsErr(0); } - - /* - Convert the FILETIME structure to a Unix time. - It's the best I could find by googling and borrowing code here and there. - The time returned has a precision of 1 second. - */ +*/ + // Convert the FILETIME structure to a Unix time. + // It's the best I could find by googling and borrowing code here + // and there. The time returned has a precision of 1 second. unix_time = ((LONGLONG)ftCreate.dwHighDateTime) << 32; unix_time += ftCreate.dwLowDateTime - 116444736000000000LL; unix_time /= 10000000; |