Skip to content

Commit

Permalink
[tailscale] os: disable pidfd on Android
Browse files Browse the repository at this point in the history
Updates tailscale/tailscale#13452
Updates golang#69065

Signed-off-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
bradfitz committed Sep 12, 2024
1 parent 0a7392b commit ca51bbe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/os/pidfd_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ package os
import (
"errors"
"internal/syscall/unix"
"runtime"
"sync"
"syscall"
"unsafe"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit ca51bbe

Please sign in to comment.