diff options
| author | Ian Lance Taylor <iant@golang.org> | 2024-12-22 20:20:17 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-02-04 13:10:59 -0800 |
| commit | 5c2b5e02c422ab3936645e2faa4489bf32fa8a57 (patch) | |
| tree | 59df2f0abcb9989607717feb7358547f0c723d75 /src/os/exec_windows.go | |
| parent | 0825475599d40c786c19c3449e22d2db66754456 (diff) | |
| download | go-5c2b5e02c422ab3936645e2faa4489bf32fa8a57.tar.xz | |
os: separate Process.handle into a separate memory allocation
This is a step toward using AddCleanup rather than SetFinalizer
to close process handles.
For #70907
Change-Id: I7fb37461dd67b27135eab46fbdae94f0058ace85
Reviewed-on: https://go-review.googlesource.com/c/go/+/638575
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Diffstat (limited to 'src/os/exec_windows.go')
| -rw-r--r-- | src/os/exec_windows.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/exec_windows.go b/src/os/exec_windows.go index ab2dae1d71..43445d6804 100644 --- a/src/os/exec_windows.go +++ b/src/os/exec_windows.go @@ -88,8 +88,8 @@ func (p *Process) release() error { return nil } -func (p *Process) closeHandle() { - syscall.CloseHandle(syscall.Handle(p.handle)) +func (ph *processHandle) closeHandle() { + syscall.CloseHandle(syscall.Handle(ph.handle)) } func findProcess(pid int) (p *Process, err error) { |
