Commit 71f2c36a authored by Steve Bennett's avatar Steve Bennett
Browse files

win32: Fix process handle vs pid distinction



On win32, a process is identified by a HANDLE, but for identifying
a running process we should use GetProcessId() to return a meaningful integer.

This means we need to be able to back and forth between a pid and a process handle
(phandle). We also need to be careful to get the pid before the process handle closes
since it isn't available afterwards.

Also call the handle to intptr_t for open_osfhandle() to avoid a compiler warning.

Fixes #217

Signed-off-by: default avatarSteve Bennett <steveb@workware.net.au>
parent 5b967d60
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment