From 31640b1e1a07f4147fadb742696538171912244a Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 6 Aug 2024 16:00:38 -0700 Subject: [PATCH] _content/doc/go1.23: os: document pidfd Briefly describe pidfd, and note the extra opened file descriptors as per request in [1]. [1]: https://github.com/golang/go/issues/62654#issuecomment-2170992329 Updates golang/go#62654. For golang/go#65614. Co-authored-by: Michael Pratt Change-Id: Ie2a8e917cbbb1c6129a1706c22c9993222855bc4 Reviewed-on: https://go-review.googlesource.com/c/website/+/603717 Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Pratt LUCI-TryBot-Result: Go LUCI Auto-Submit: Michael Pratt --- _content/doc/go1.23.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_content/doc/go1.23.md b/_content/doc/go1.23.md index accfcb31..b203d257 100644 --- a/_content/doc/go1.23.md +++ b/_content/doc/go1.23.md @@ -451,6 +451,13 @@ This behavior is controlled by the `winreadlinkvolume` setting. For Go 1.23, it defaults to `winreadlinkvolume=1`. Previous versions default to `winreadlinkvolume=0`. + +On Linux with pidfd support (generally Linux v5.4+), +[`Process`](/pkg/os#Process)-related functions and methods use pidfd (rather +than PID) internally, eliminating potential mistargeting when a PID is reused +by the OS. Pidfd support is fully transparent to a user, except for additional +process file descriptors that a process may have. + #### [`path/filepath`](/pkg/path/filepath/) The new [`Localize`](/pkg/path/filepath#Localize) function safely converts a slash-separated @@ -604,7 +611,6 @@ None right now; more may come up later on.