Radar · Go · Archive · Week 25 · Jun 16 – 22, 2025
os: add (*Process).WithHandle
Worth knowingstdlib
- What changed
- A new method
WithHandleonos.Processcalls a supplied function with a valid process handle (pidfd on Linux 5.4+ or a Windows handle). If no handle is available it returnsErrNoHandle. - Production impact
- The source does not say.
- Try it
- Create an
os.Processand callWithHandleto print the handle value. - Source
- github.com/golang/go/issues/70352
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed