From cdf3249d74c4187bc0c1737e1bb6ab1aa52c0b6f Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 16 Nov 2023 01:42:39 -0800 Subject: os: make FindProcess use pidfd on Linux Amend FindProcess to use pidfdFind, and make it return ErrProcessDone if pidfdFind is used and the process is not found. Since this is a change in API, introduce GODEBUG osfinderr=0 setting to disable the feature. Change-Id: I724c6f622f0c99f21a70b864cf7cf2b8836869ee Reviewed-on: https://go-review.googlesource.com/c/go/+/542699 LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Reviewed-by: Than McIntosh --- src/runtime/metrics/doc.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/runtime') diff --git a/src/runtime/metrics/doc.go b/src/runtime/metrics/doc.go index fb2f44da29..d1c2f8aa25 100644 --- a/src/runtime/metrics/doc.go +++ b/src/runtime/metrics/doc.go @@ -290,6 +290,10 @@ Below is the full list of supported metrics, ordered lexicographically. The number of non-default behaviors executed by the net package due to a non-default GODEBUG=multipathtcp=... setting. + /godebug/non-default-behavior/osfinderr:events + The number of non-default behaviors executed by the os package + due to a non-default GODEBUG=osfinderr=... setting. + /godebug/non-default-behavior/panicnil:events The number of non-default behaviors executed by the runtime package due to a non-default GODEBUG=panicnil=... setting. -- cgit v1.3