From ed9dc37b2b000f376a3e819cbb159e2c17a2dac6 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 12 Sep 2024 10:52:45 -0700 Subject: [PATCH] [tailscale] os: disable pidfd on Android Updates tailscale/tailscale#13452 Updates golang/go#69065 Signed-off-by: Brad Fitzpatrick --- src/os/pidfd_linux.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/os/pidfd_linux.go b/src/os/pidfd_linux.go index 545cfe9613b8b..6d24b821aeaa7 100644 --- a/src/os/pidfd_linux.go +++ b/src/os/pidfd_linux.go @@ -14,6 +14,7 @@ package os import ( "errors" "internal/syscall/unix" + "runtime" "sync" "syscall" "unsafe" @@ -134,6 +135,17 @@ func (p *Process) pidfdSendSignal(s syscall.Signal) error { } func pidfdWorks() bool { + if runtime.GOOS == "android" { + // Tailscale-specific workaround while + // https://github.com/golang/go/issues/69065 + // is fixed. + // + // See: https://github.com/tailscale/tailscale/issues/13452 + // + // For now (2024-09-12), we'll just disable pidfd + // on all Android releases, like Go 1.22. + return false + } return checkPidfdOnce() == nil }