From 5c2b5e02c422ab3936645e2faa4489bf32fa8a57 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 22 Dec 2024 20:20:17 -0800 Subject: 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 Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Reviewed-by: Robert Griesemer --- src/os/exec_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/os/exec_linux.go') diff --git a/src/os/exec_linux.go b/src/os/exec_linux.go index b47c6cb191..aaa022cb96 100644 --- a/src/os/exec_linux.go +++ b/src/os/exec_linux.go @@ -8,6 +8,6 @@ import ( "syscall" ) -func (p *Process) closeHandle() { - syscall.Close(int(p.handle)) +func (ph *processHandle) closeHandle() { + syscall.Close(int(ph.handle)) } -- cgit v1.3