go/doc/next/6-stdlib/99-minor/os/70352.md
Kir Kolyshkin 8ace10dad2 os: add (*Process).WithHandle
Implement (*Process).WithHandle, add tests for all platforms.

Fixes #70352

Change-Id: I7a8012fb4e1e1b4ce1e75a59403ff6e77504fc56
Reviewed-on: https://go-review.googlesource.com/c/go/+/699615
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Auto-Submit: Kirill Kolyshkin <kolyshkin@gmail.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2025-09-15 12:17:42 -07:00

278 B

The new [Process.WithHandle] method provides access to an internal process handle on supported platforms (Linux 5.4 or later and Windows). On Linux, the process handle is a pidfd. The method returns [ErrNoHandle] on unsupported platforms or when no process handle is available.