diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-04-14 08:10:41 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-04-14 11:13:02 +1000 |
commit | 703ac20adb9daff423eea44f4af548f485a97254 (patch) | |
tree | df2028559e32c5cf4988828e127ddaace7dae359 /tests | |
parent | 5b967d60f4f5277e0f843d15fc54c0cb906a1bc2 (diff) | |
download | jimtcl-703ac20adb9daff423eea44f4af548f485a97254.zip jimtcl-703ac20adb9daff423eea44f4af548f485a97254.tar.gz jimtcl-703ac20adb9daff423eea44f4af548f485a97254.tar.bz2 |
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: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/exec2.test | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/exec2.test b/tests/exec2.test index 6cb00cf..b1af8ab 100644 --- a/tests/exec2.test +++ b/tests/exec2.test @@ -100,7 +100,7 @@ test exec2-3.4 "wait for background task" -constraints wait -body { set pid [exec sleep 0.1 &] lassign [wait $pid] status newpid exitcode if {$pid != $newpid} { - error "Got wrong pid from wait" + error "wait $pid returned pid=$newpid" } else { list $status $exitcode } |