Skip to content

Commit ca51bbe

Browse files
committed
[tailscale] os: disable pidfd on Android
Updates tailscale/tailscale#13452 Updates golang#69065 Signed-off-by: Brad Fitzpatrick <[email protected]>
1 parent 0a7392b commit ca51bbe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/os/pidfd_linux.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ package os
1414
import (
1515
"errors"
1616
"internal/syscall/unix"
17+
"runtime"
1718
"sync"
1819
"syscall"
1920
"unsafe"
@@ -134,6 +135,17 @@ func (p *Process) pidfdSendSignal(s syscall.Signal) error {
134135
}
135136

136137
func pidfdWorks() bool {
138+
if runtime.GOOS == "android" {
139+
// Tailscale-specific workaround while
140+
// https://github.com/golang/go/issues/69065
141+
// is fixed.
142+
//
143+
// See: https://github.com/tailscale/tailscale/issues/13452
144+
//
145+
// For now (2024-09-12), we'll just disable pidfd
146+
// on all Android releases, like Go 1.22.
147+
return false
148+
}
137149
return checkPidfdOnce() == nil
138150
}
139151

0 commit comments

Comments
 (0)