runtime: allow TestCtrlHandler to run in ConPTY
Fixes #51602. Previous test would not run in a pseudo-console (ConPTY).
New test avoids taskkill entirely by having the child request its own
console window be closed.
Verified that this runs locally (within a real console), over SSH
(within a pseudo-console), and that it breaks if #41884 were reverted.
Change-Id: If868b92ec36647e5d0e4107e29a2a6e048d35ced
GitHub-Last-Rev:
b1421e4bed2dc729c266928f002b39374d7e391a
GitHub-Pull-Request: golang/go#51681
Reviewed-on: https://go-review.googlesource.com/c/go/+/392874
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Trust: Alex Brainman <alex.brainman@gmail.com>