diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-17 17:42:43 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-17 17:42:43 +0200 |
commit | 2c56220ab9c86353f8db109a884ed3efd9c2579c (patch) | |
tree | af90d3ef01c6ec1410b9d36b2290b905614ea487 | |
parent | 0c2eb2ab9e644df8e012dd36e3d2994695bab1cc (diff) | |
download | psutil-2c56220ab9c86353f8db109a884ed3efd9c2579c.tar.gz |
small refactoring
-rw-r--r-- | psutil/arch/windows/process_info.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/psutil/arch/windows/process_info.c b/psutil/arch/windows/process_info.c index 544dcfd0..24f7271c 100644 --- a/psutil/arch/windows/process_info.c +++ b/psutil/arch/windows/process_info.c @@ -147,7 +147,10 @@ psutil_pid_is_running(DWORD pid) { CloseHandle(hProcess); // XXX - maybe STILL_ACTIVE is not fully reliable as per: // http://stackoverflow.com/questions/1591342/#comment47830782_1591379 - return (exitCode == STILL_ACTIVE); + if (exitCode == STILL_ACTIVE) + return 1; + else + return 0; } else { err = GetLastError(); |