aboutsummaryrefslogtreecommitdiff
path: root/src/os/pidfd_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/pidfd_linux.go')
-rw-r--r--src/os/pidfd_linux.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/os/pidfd_linux.go b/src/os/pidfd_linux.go
index cc67dfa05f..d6e1d53eee 100644
--- a/src/os/pidfd_linux.go
+++ b/src/os/pidfd_linux.go
@@ -14,7 +14,6 @@
package os
import (
- "internal/godebug"
"internal/syscall/unix"
"sync"
"syscall"
@@ -50,25 +49,6 @@ func getPidfd(sysAttr *syscall.SysProcAttr) uintptr {
return uintptr(*sysAttr.PidFD)
}
-var osfinderr = godebug.New("osfinderr")
-
-func pidfdFind(pid int) (uintptr, error) {
- if !pidfdWorks() {
- return unsetHandle, syscall.ENOSYS
- }
- if osfinderr.Value() == "0" {
- osfinderr.IncNonDefault()
- return unsetHandle, syscall.ENOSYS
-
- }
-
- h, err := unix.PidFDOpen(pid, 0)
- if err == nil {
- return h, nil
- }
- return unsetHandle, convertESRCH(err)
-}
-
func (p *Process) pidfdRelease() {
// Release pidfd unconditionally.
handle := p.handle.Swap(unsetHandle)